diff --git a/Setup.hs b/Setup.hs
--- a/Setup.hs
+++ b/Setup.hs
@@ -21,9 +21,9 @@
 main = defaultMainWithHooks myHooks
 
     where myHooks = simpleUserHooks { preConf = buildScript
-                                    , postReg = maybeCleanATS }
+                                    , postBuild = maybeCleanATS }
 
-maybeCleanATS :: Args -> RegisterFlags -> PackageDescription -> LocalBuildInfo -> IO ()
+maybeCleanATS :: Args -> BuildFlags -> PackageDescription -> LocalBuildInfo -> IO ()
 maybeCleanATS _ _ _ li =
     let cf = configConfigurationsFlags (configFlags li) in
 
@@ -65,5 +65,5 @@
         needsMove <- doesDirectoryExist (dirName ++ "/package")
         when needsMove $ do
             renameDirectory (dirName ++ "/package") "tempdir"
-            removeDirectory dirName
+            removeDirectoryRecursive dirName
             renameDirectory "tempdir" dirName
diff --git a/cbits/number-theory.c b/cbits/number-theory.c
--- a/cbits/number-theory.c
+++ b/cbits/number-theory.c
@@ -1,7 +1,7 @@
 /*
 **
 ** The C code is generated by [ATS/Postiats-0-3-8]
-** The starting compilation time is: 2018-1-4:  1h:45m
+** The starting compilation time is: 2018-1-4:  2h:26m
 **
 */
 
diff --git a/cbits/numerics.c b/cbits/numerics.c
--- a/cbits/numerics.c
+++ b/cbits/numerics.c
@@ -1,7 +1,7 @@
 /*
 **
 ** The C code is generated by [ATS/Postiats-0-3-8]
-** The starting compilation time is: 2018-1-4:  1h:45m
+** The starting compilation time is: 2018-1-4:  2h:26m
 **
 */
 
diff --git a/fast-arithmetic.cabal b/fast-arithmetic.cabal
--- a/fast-arithmetic.cabal
+++ b/fast-arithmetic.cabal
@@ -1,5 +1,5 @@
 name:                fast-arithmetic
-version:             0.1.0.1
+version:             0.1.0.2
 synopsis:            Fast number-theoretic functions.
 description:         Fast number-theoretic code with a high level of safety guaranteed by ATS.
 homepage:            https://github.com/vmchale/fast-arithmetic#readme
