diff --git a/Data/Conduit/Async.hs b/Data/Conduit/Async.hs
--- a/Data/Conduit/Async.hs
+++ b/Data/Conduit/Async.hs
@@ -33,7 +33,7 @@
            -> (TBQueue o -> m ()) -- ^ Action that generates output values
            -> ConduitT () o m ()
 gatherFrom size scatter = do
-    chan   <- liftIO $ newTBQueueIO size
+    chan   <- liftIO $ newTBQueueIO (fromIntegral size)
     worker <- lift $ async (scatter chan)
     gather worker chan
   where
@@ -54,7 +54,7 @@
         -> (TBQueue (Maybe i) -> m r)  -- ^ Action to consume input values
         -> ConduitT i Void m r
 drainTo size gather = do
-    chan   <- liftIO $ newTBQueueIO size
+    chan   <- liftIO $ newTBQueueIO (fromIntegral size)
     worker <- lift $ async (gather chan)
     scatter worker chan
   where
diff --git a/Data/Conduit/Async/Composition.hs b/Data/Conduit/Async/Composition.hs
--- a/Data/Conduit/Async/Composition.hs
+++ b/Data/Conduit/Async/Composition.hs
@@ -245,7 +245,7 @@
   type RunConstraints CConduit m = (MonadUnliftIO m, MonadIO m)
   runCConduit (Single c) = runConduit c
   runCConduit (Multiple bufsz c cs) = do
-    chan <- liftIO $ newTBQueueIO bufsz
+    chan <- liftIO $ newTBQueueIO (fromIntegral bufsz)
     withAsync (sender chan c) $ \c' ->
       stage chan c' cs
 
@@ -253,11 +253,11 @@
   type RunConstraints CFConduit m = (MonadThrow m, MonadUnliftIO m, MonadIO m, MonadResource m)
   runCConduit (FSingle c) = runConduit c
   runCConduit (FMultiple bufsz c cs) = do
-    chan <- liftIO $ newTBQueueIO bufsz
+    chan <- liftIO $ newTBQueueIO (fromIntegral bufsz)
     withAsync (sender chan c) $ \c' ->
       fstage (receiver chan) c' cs
   runCConduit (FMultipleF bufsz filemax tempDir c cs) = do
-    context <- liftIO $ BufferContext <$> newTBQueueIO bufsz
+    context <- liftIO $ BufferContext <$> newTBQueueIO (fromIntegral bufsz)
                                       <*> newTQueueIO
                                       <*> newTVarIO filemax
                                       <*> newTVarIO False
@@ -290,7 +290,7 @@
   -- not the last layer, so take the input from "chan", have this
   -- layer's conduit process it, and send the conduit's output to the
   -- next layer.
-  chan' <- liftIO $ newTBQueueIO bufsz
+  chan' <- liftIO $ newTBQueueIO (fromIntegral bufsz)
   withAsync (sender chan' $ receiver chan .| c) $ \c' -> do
     link2 prevAsync c'
     stage chan' c' cs
@@ -356,14 +356,14 @@
   -- This stage is connected to the next via a non-file-backed
   -- channel, so it just uses "sender" and "reciever" in the same way
   -- "stage" does.
-  chan' <- liftIO $ newTBQueueIO bufsz
+  chan' <- liftIO $ newTBQueueIO (fromIntegral bufsz)
   withAsync (sender chan' $ prevStage .| c) $ \c' -> do
     link2 prevAsync c'
     fstage (receiver chan') c' cs
 fstage prevStage prevAsync (FMultipleF bufsz dsksz tempDir c cs) = do
   -- This potentially needs to write its output to a file, so it uses
   -- "fsender" send and tells the next stage to use "freceiver" to read.
-  bc <- liftIO $ BufferContext <$> newTBQueueIO bufsz
+  bc <- liftIO $ BufferContext <$> newTBQueueIO (fromIntegral bufsz)
                                <*> newTQueueIO
                                <*> newTVarIO dsksz
                                <*> newTVarIO False
diff --git a/Data/Conduit/TQueue.hs b/Data/Conduit/TQueue.hs
--- a/Data/Conduit/TQueue.hs
+++ b/Data/Conduit/TQueue.hs
@@ -87,7 +87,7 @@
 -- channel, otherwise channel will be closed when the ResourceT scope will be closed.
 entangledPair :: MonadIO m => Int -> m (ConduitT z a m (), ConduitT a l m ())
 entangledPair size = liftM (liftM2 (,) sourceTBQueue sinkTBQueue) $
-  liftIO $ atomically $ newTBQueue size
+  liftIO $ atomically $ newTBQueue (fromIntegral size)
 
 -- | A simple wrapper around a "TMQueue". As data is pushed into the queue, the
 --   source will read it and pass it down the conduit pipeline. When the
diff --git a/Data/Conduit/Utils.hs b/Data/Conduit/Utils.hs
--- a/Data/Conduit/Utils.hs
+++ b/Data/Conduit/Utils.hs
@@ -129,13 +129,13 @@
 -- Instances
 -------------------------------------------------------------------------------
 instance BoundedStream (Proxy2 TBQueue) TBQueue where
-  mkBStream _ i = atomically $ newTBQueue i
+  mkBStream _ i = atomically $ newTBQueue (fromIntegral i)
 
 instance BoundedStream (Proxy2 TBMQueue) TBMQueue where
-  mkBStream _ i = atomically $ newTBMQueue i
+  mkBStream _ i = atomically $ newTBMQueue (fromIntegral i)
 
 instance BoundedStream (Proxy2 TBMChan) TBMChan where
-  mkBStream _ i = atomically $ newTBMChan i
+  mkBStream _ i = atomically $ newTBMChan (fromIntegral i)
 
 instance UnboundedStream (Proxy2 TMQueue) TMQueue where
   mkUStream _ = atomically $ newTMQueue
diff --git a/stm-conduit.cabal b/stm-conduit.cabal
--- a/stm-conduit.cabal
+++ b/stm-conduit.cabal
@@ -1,5 +1,5 @@
 Name:                stm-conduit
-Version:             4.0.0
+Version:             4.0.1
 Synopsis:            Introduces conduits to channels, and promotes using conduits concurrently.
 Description:         Provides two simple conduit wrappers around STM channels - a source and a sink.
                      
@@ -29,7 +29,7 @@
     build-depends:
         base                == 4.*
       , transformers        >= 0.2 && < 0.6
-      , stm                 == 2.4.*
+      , stm                 >= 2.4 && < 2.6
       , stm-chans           >= 2.0 && < 3.1
       , cereal              >= 0.4.0.1
       , cereal-conduit      >= 0.8
