diff --git a/Tools/StatePlot.hs b/Tools/StatePlot.hs
--- a/Tools/StatePlot.hs
+++ b/Tools/StatePlot.hs
@@ -84,7 +84,7 @@
 
 data TickSize = LargeTick | SmallTick
 
-newtype RenderState s a = RenderState { runRenderState :: StateT s C.Render a } deriving (Monad, MonadState s)
+newtype RenderState s a = RenderState { runRenderState :: StateT s C.Render a } deriving (Functor,Applicative,Monad, MonadState s)
 
 type CProgram = (Double, Double) -> C.Render ()
 
diff --git a/splot.cabal b/splot.cabal
--- a/splot.cabal
+++ b/splot.cabal
@@ -1,5 +1,5 @@
 Name: splot
-Version: 0.3.12
+Version: 0.3.13
 License: BSD3
 License-file: LICENSE
 Copyright: Eugene Kirpichov, 2010
@@ -27,7 +27,7 @@
   else
     Build-Depends: base < 3
 
-  Build-Depends: cairo, bytestring, bytestring-lexing, strptime >= 0.1.7, time, 
+  Build-Depends: cairo, bytestring, bytestring-lexing < 0.5.0, strptime >= 0.1.7, time, 
                  containers, colour, mtl, HUnit, template-haskell, vcs-revision >= 0.0.2
   Other-Modules: Tools.ColorMap Tools.SPlotTest Tools.SPlotTest Tools.StatePlot
   Main-Is: Tools/SPlotMain.hs
