diff --git a/CHANGES b/CHANGES
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+0.5.2 - 091121
+* updated for the latest OpenGL
+
 0.5.1 - 090812
 * adjusted path handling code to be more robust (so it works on
   Windows too)
diff --git a/hp2any-graph.cabal b/hp2any-graph.cabal
--- a/hp2any-graph.cabal
+++ b/hp2any-graph.cabal
@@ -1,5 +1,5 @@
 Name:          hp2any-graph
-Version:       0.5.1
+Version:       0.5.2
 Cabal-Version: >= 1.2
 Synopsis:      Real-time heap graphing utility and profile stream server with a reusable graphing module.
 Category:      profiling, development, utils
diff --git a/src/Graph.hs b/src/Graph.hs
--- a/src/Graph.hs
+++ b/src/Graph.hs
@@ -157,7 +157,7 @@
 -- RGB values under the mouse cursor.
 hoverColour (Position x y) = allocaBytes 4 $ \colData -> do    
   Size _ h <- get windowSize
-  readPixels (Position x (h-y)) (Size 1 1) (PixelData RGBA UnsignedByte colData)
+  readPixels (Position x (fromIntegral h-y)) (Size 1 1) (PixelData RGBA UnsignedByte colData)
   r <- peekElemOff colData 0
   g <- peekElemOff colData 1
   b <- peekElemOff colData 2
