diff --git a/EventDuration.hs b/EventDuration.hs
--- a/EventDuration.hs
+++ b/EventDuration.hs
@@ -96,7 +96,9 @@
     rest = eventsToDurations events
 
     runDuration t = ThreadRun t s (time event) endTime
-       where (endTime, s) = findRunThreadTime events
+       where (endTime, s) = case findRunThreadTime events of
+                              Nothing -> error $ "findRunThreadTime for " ++ (show event)
+                              Just x -> x
 
 isDiscreteEvent :: GHC.Event -> Bool
 isDiscreteEvent e = 
@@ -164,11 +166,11 @@
 
 -------------------------------------------------------------------------------
 
-findRunThreadTime :: [GHC.Event] -> (Timestamp, ThreadStopStatus)
-findRunThreadTime [] = error "findRunThreadTime"
+findRunThreadTime :: [GHC.Event] -> Maybe (Timestamp, ThreadStopStatus)
+findRunThreadTime [] = Nothing
 findRunThreadTime (e : es)
   = case spec e of
-      StopThread{status=s} -> (time e, s)
+      StopThread{status=s} -> Just (time e, s)
       _                    -> findRunThreadTime es
 
 -------------------------------------------------------------------------------
diff --git a/Timeline/Render.hs b/Timeline/Render.hs
--- a/Timeline/Render.hs
+++ b/Timeline/Render.hs
@@ -24,6 +24,7 @@
 import Graphics.UI.Gtk
 import Graphics.UI.Gtk.Gdk.Events as Old
 import Graphics.Rendering.Cairo  as C
+import Graphics.UI.Gtk.Gdk.GC
 
 import Data.Maybe
 import Data.IORef
diff --git a/threadscope.cabal b/threadscope.cabal
--- a/threadscope.cabal
+++ b/threadscope.cabal
@@ -1,5 +1,5 @@
 Name:                threadscope
-Version:             0.1.1
+Version:             0.1.2
 Description:         A graphical viewer for GHC eventlog traces.
 License:             BSD3
 License-file:        LICENSE
@@ -58,7 +58,7 @@
      ghc-options:  -Wall
 
   if !os(windows)
-     build-depends: unix >= 2.3.0
+     build-depends: unix >= 2.3 && < 2.5
 
   ghc-options:  -fno-warn-type-defaults -fno-warn-name-shadowing
 
