diff --git a/Git/Libgit2.hs b/Git/Libgit2.hs
--- a/Git/Libgit2.hs
+++ b/Git/Libgit2.hs
@@ -352,7 +352,7 @@
            -> (TBQueue o -> m ()) -- ^ Action that generates output values
            -> Producer m o
 gatherFrom' size scatter = do
-    chan   <- liftIO $ newTBQueueIO size
+    chan   <- liftIO $ newTBQueueIO (fromIntegral size)
     worker <- lift $ async (scatter chan)
     gather worker chan
   where
diff --git a/gitlib-libgit2.cabal b/gitlib-libgit2.cabal
--- a/gitlib-libgit2.cabal
+++ b/gitlib-libgit2.cabal
@@ -1,5 +1,5 @@
 Name:                gitlib-libgit2
-Version:             3.1.2
+Version:             3.1.2.1
 Synopsis:            Libgit2 backend for gitlib
 License-file:        LICENSE
 License:             MIT
