diff --git a/Tools/StatePlot.hs b/Tools/StatePlot.hs
--- a/Tools/StatePlot.hs
+++ b/Tools/StatePlot.hs
@@ -58,7 +58,9 @@
     maybeM f Nothing  = return ()
     maybeM f (Just x) = f x >> return ()
 
-    bars track = execWriter $ evalStateT (mapM step track) Nothing
+    bars track = execWriter $ do
+        (w, s) <- runStateT (mapM step track) Nothing
+        maybeM (\(t0,c0) -> tell [(time2ms t0, time2ms maxTime, c0)]) s
       where
         step (Event t _ (Begin c)) = do
           get >>= maybeM (\(t0,c0) -> tell [(time2ms t0, time2ms t, c0)])
diff --git a/splot.cabal b/splot.cabal
--- a/splot.cabal
+++ b/splot.cabal
@@ -1,5 +1,5 @@
 Name: splot
-Version: 0.1.1
+Version: 0.1.2
 License: BSD3
 License-file: LICENSE
 Copyright: Eugene Kirpichov, 2010
