diff --git a/MissingPy.cabal b/MissingPy.cabal
--- a/MissingPy.cabal
+++ b/MissingPy.cabal
@@ -1,5 +1,5 @@
 Name: MissingPy
-Version: 0.10.4
+Version: 0.10.5
 License: MIT
 Maintainer: Matt Brown <matt@softmechanics.net>
 Author: John Goerzen
diff --git a/Python/Interpreter.hs b/Python/Interpreter.hs
--- a/Python/Interpreter.hs
+++ b/Python/Interpreter.hs
@@ -100,6 +100,7 @@
                     )
 
 import Foreign.C (withCString)
+import Control.Exception (finally)
 
 {- | Initialize the Python interpreter environment.
 
@@ -115,9 +116,8 @@
 #ifndef PYTHON_PRE_2_3
 withGIL :: IO a -> IO a                           
 withGIL act = do st <- cpy_GILEnsure
-                 r <- act
-                 cpy_GILRelease st
-                 return r
+                 finally act
+                   (cpy_GILRelease st)
 #endif                 
 
 pyRun_SimpleString :: String -> IO ()
