diff --git a/Graphics/Rendering/Cairo.hs b/Graphics/Rendering/Cairo.hs
--- a/Graphics/Rendering/Cairo.hs
+++ b/Graphics/Rendering/Cairo.hs
@@ -325,12 +325,12 @@
 -- internal module of GHC
 import Data.Array.Base ( MArray, newArray, newArray_, unsafeRead, unsafeWrite,
 #if __GLASGOW_HASKELL__ < 605
-			 HasBounds, bounds
+                         HasBounds, bounds
 #else
-			 getBounds
+                         getBounds
 #endif
 #if __GLASGOW_HASKELL__ >= 608
-			 ,getNumElements
+                         ,getNumElements
 #endif
                        )
 import Graphics.Rendering.Cairo.Internal (imageSurfaceCreateFromPNG)
@@ -990,8 +990,8 @@
 -- to moveTo (x + @dx@) (y + @dy@)
 --
 relMoveTo ::
-     Double -- ^ @dx@ -	the X offset
-  -> Double -- ^ @dy@ -	the Y offset
+     Double -- ^ @dx@ - the X offset
+  -> Double -- ^ @dy@ - the Y offset
   -> Render ()
 relMoveTo = liftRender2 Internal.relMoveTo
 
@@ -1381,7 +1381,7 @@
 --
 setFontOptions :: FontOptions -> Render ()
 setFontOptions = liftRender1 Internal.setFontOptions
-	
+        
 -- | A drawing operator that generates the shape from a string of Unicode
 -- characters, rendered according to the current font face, font size (font
 -- matrix), and font options.
diff --git a/Gtk2HsSetup.hs b/Gtk2HsSetup.hs
--- a/Gtk2HsSetup.hs
+++ b/Gtk2HsSetup.hs
@@ -429,15 +429,10 @@
   let modDeps = zipWith (ModDep True []) expMods mExpFiles++
                 zipWith (ModDep False []) othMods mOthFiles
   modDeps <- mapM extractDeps modDeps
-  let (expMods, othMods) = span mdExposed $ sortTopological modDeps
-      badOther = map (fromMaybe "<no file>" . mdLocation) $
-                 filter (not . mdExposed) expMods
-  unless (null badOther) $
-    die ("internal chs modules "++intercalate "," badOther++
-         " depend on exposed chs modules; cabal needs to build internal modules first")
+  let (othMods, expMods) = span (not . mdExposed) $ reverse $ sortTopological modDeps
   return pd { PD.library = Just lib {
-    PD.exposedModules = map mdOriginal expMods,
-    PD.libBuildInfo = bi { PD.otherModules = map mdOriginal othMods }
+    PD.exposedModules = map mdOriginal (reverse expMods),
+    PD.libBuildInfo = bi { PD.otherModules = map mdOriginal (reverse othMods) }
   }}
 
 data ModDep = ModDep {
diff --git a/SetupWrapper.hs b/SetupWrapper.hs
--- a/SetupWrapper.hs
+++ b/SetupWrapper.hs
@@ -20,7 +20,7 @@
 import System.Process
 import System.Exit (ExitCode(..), exitWith)
 import System.FilePath
-import System.Directory
+import System.Directory (doesFileExist, getModificationTime)
 import qualified Control.Exception as Exception
 import System.IO.Error (isDoesNotExistError)
 
diff --git a/cairo.cabal b/cairo.cabal
--- a/cairo.cabal
+++ b/cairo.cabal
@@ -1,5 +1,5 @@
 Name:           cairo
-Version:        0.13.1.0
+Version:        0.13.1.1
 License:        BSD3
 License-file:   COPYRIGHT
 Copyright:      (c) 2001-2010 The Gtk2Hs Team, (c) Paolo Martini 2005, (c) Abraham Egnor 2003, 2004, (c) Aetion Technologies LLC 2004
@@ -49,7 +49,7 @@
                         utf8-string >= 0.2 && < 1.1,
                         text >= 1.0.0.0 && < 1.3,
                         bytestring, mtl, array
-        build-tools:    gtk2hsC2hs >= 0.13.12
+        build-tools:    gtk2hsC2hs >= 0.13.13
         exposed-modules:  Graphics.Rendering.Cairo
                           Graphics.Rendering.Cairo.Matrix
                           Graphics.Rendering.Cairo.Types
