diff --git a/Network/Sendfile/Fallback.hs b/Network/Sendfile/Fallback.hs
--- a/Network/Sendfile/Fallback.hs
+++ b/Network/Sendfile/Fallback.hs
@@ -1,6 +1,7 @@
 module Network.Sendfile.Fallback (sendfile) where
 
-import Control.Monad.IO.Class
+import Control.Monad.Trans.Class (lift)
+import Control.Monad.IO.Class (liftIO)
 import Data.ByteString (ByteString)
 import Data.Conduit
 import Data.Conduit.Binary as EB
@@ -19,12 +20,14 @@
 sendfile s fp (PartOfFile off len) hook =
     runResourceT $ EB.sourceFileRange fp (Just off) (Just len) $$ sinkSocket s hook
 
-sinkSocket :: Socket -> IO () -> Sink ByteString IO ()
-sinkSocket s hook =
-    SinkData push close
+sinkSocket :: MonadResource m => Socket -> IO () -> Sink ByteString m ()
+sinkSocket s hook = NeedInput push close
   where
-    push bs = do
-        liftIO $ SB.sendAll s bs
-        liftIO hook
-        return (Processing push close)
-    close = return ()
+    push bs = PipeM sendAndHook close'
+      where
+        sendAndHook = do
+            liftIO (SB.sendAll s bs)
+            liftIO hook
+            return (NeedInput push close)
+    close' = return ()
+    close  = lift close'
diff --git a/simple-sendfile.cabal b/simple-sendfile.cabal
--- a/simple-sendfile.cabal
+++ b/simple-sendfile.cabal
@@ -1,5 +1,5 @@
 Name:                   simple-sendfile
-Version:                0.2.1
+Version:                0.2.2
 Author:                 Kazu Yamamoto <kazu@iij.ad.jp>
 Maintainer:             Kazu Yamamoto <kazu@iij.ad.jp>
 License:                BSD3
@@ -37,7 +37,9 @@
         Build-Depends: unix
       else
         Other-Modules: Network.Sendfile.Fallback
-        Build-Depends: bytestring, conduit, transformers
+        Build-Depends: bytestring      >= 0.9   && < 0.10
+                     , conduit         >= 0.4   && < 0.5
+                     , transformers    >= 0.2.2 && < 0.4
 
 Source-Repository head
   Type:                 git
