diff --git a/Data/Conduit/TMChan.hs b/Data/Conduit/TMChan.hs
--- a/Data/Conduit/TMChan.hs
+++ b/Data/Conduit/TMChan.hs
@@ -60,6 +60,7 @@
 import Control.Concurrent.STM.TMChan
 
 import Data.Conduit
+import Data.Conduit.Internal
 
 chanSource 
     :: MonadIO m
@@ -69,11 +70,11 @@
     -> Source m a
 chanSource ch reader closer = src
     where
-        src = PipeM pull close
+        src = PipeM pull
         pull = do a <- liftSTM $ reader ch
                   case a of
                     Just x  -> return $ HaveOutput src close x
-                    Nothing -> return $ Done Nothing ()
+                    Nothing -> return $ Done ()
         close = liftSTM $ closer ch
 {-# INLINE chanSource #-}
 
@@ -88,8 +89,8 @@
         sink = NeedInput push close
 
         push input = PipeM ((liftIO . atomically $ writer ch input) 
-                            >> (return $ NeedInput push close)) close
-        close = liftSTM $ closer ch
+                            >> (return $ NeedInput push close))
+        close = const . liftSTM $ closer ch
 {-# INLINE chanSink #-}
 
 -- | A simple wrapper around a TBMChan. As data is pushed into the channel, the
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:             0.4.1
+Version:             0.4.2
 Synopsis:            Introduces conduits to channels, and promotes using
                      conduits concurrently.
 Description:         Provides two simple conduit wrappers around STM
@@ -16,17 +16,18 @@
 Cabal-version:       >=1.8
 
 Library
-    Exposed-modules:   Data.Conduit.TMChan
+    exposed-modules:
+        Data.Conduit.TMChan
     
-    -- Packages needed in order to build this package.
-    Build-depends:     base ==4.*,
-                       transformers >=0.2 && <= 0.4,
-                       stm == 2.3.*,
-                       stm-chans ==1.3.*,
-                       conduit ==0.4.*,
-                       resourcet == 0.3.*
+    build-depends:
+        base         == 4.*
+      , transformers >= 0.2 && <= 0.4
+      , stm          == 2.4.*
+      , stm-chans    == 1.3.*
+      , conduit      == 0.5.*
+      , resourcet    == 0.3.*
 
-    ghc-options:       -Wall -fwarn-tabs
+    ghc-options: -Wall -fwarn-tabs -fwarn-unused-imports
 
 test-suite stm-conduit-tests
     type:           exitcode-stdio-1.0
@@ -35,17 +36,18 @@
 
     ghc-options:    -rtsopts=all -threaded
 
-    Build-Depends:  base ==4.*,
-                    QuickCheck >= 2,
-                    HUnit,
-                    test-framework,
-                    test-framework-hunit,
-                    test-framework-quickcheck2,
-                    stm,
-                    stm-conduit,
-                    conduit,
-                    transformers,
-                    stm-chans
+    build-Depends:
+        base       == 4.*
+      , QuickCheck >= 2
+      , HUnit
+      , test-framework
+      , test-framework-hunit
+      , test-framework-quickcheck2
+      , stm
+      , stm-conduit
+      , conduit
+      , transformers
+      , stm-chans
   
 source-repository head
     type:     git
