diff --git a/Network/Wai/Handler/WebSockets.hs b/Network/Wai/Handler/WebSockets.hs
--- a/Network/Wai/Handler/WebSockets.hs
+++ b/Network/Wai/Handler/WebSockets.hs
@@ -8,7 +8,7 @@
 import Data.ByteString (ByteString)
 import Data.Char (toLower)
 import qualified Data.ByteString.Char8 as S
-import qualified Data.Conduit as C
+import Data.Conduit
 import qualified Data.Enumerator as E
 import qualified Network.Wai as Wai
 import qualified Network.Wai.Handler.Warp as Warp
@@ -18,7 +18,7 @@
 intercept :: WS.Protocol p
           => (WS.Request -> WS.WebSockets p ())
           -> Wai.Request
-          -> Maybe (C.Source (C.ResourceT IO) ByteString -> Warp.Connection -> C.ResourceT IO ())
+          -> Maybe (Source (ResourceT IO) ByteString -> Warp.Connection -> ResourceT IO ())
 intercept = interceptWith WS.defaultWebSocketsOptions
 
 -- | Variation of 'intercept' which allows custom options.
@@ -26,7 +26,7 @@
               => WS.WebSocketsOptions
               -> (WS.Request -> WS.WebSockets p ())
               -> Wai.Request
-              -> Maybe (C.Source (C.ResourceT IO) ByteString -> Warp.Connection -> C.ResourceT IO ())
+              -> Maybe (Source (ResourceT IO) ByteString -> Warp.Connection -> ResourceT IO ())
 interceptWith opts app req = case lookup "upgrade" $ Wai.requestHeaders req of
     Just s
         | S.map toLower s == "websocket" -> Just $ runWebSockets opts req' app
@@ -41,21 +41,23 @@
               => WS.WebSocketsOptions
               -> WS.RequestHttpPart
               -> (WS.Request -> WS.WebSockets p ())
-              -> C.Source (C.ResourceT IO) ByteString
+              -> Source (ResourceT IO) ByteString
               -> Warp.Connection
-              -> C.ResourceT IO ()
+              -> ResourceT IO ()
 runWebSockets opts req app source conn = do
     step <- liftIO $ E.runIteratee $ WS.runWebSocketsWith opts req app send
-    source C.$$ C.sinkState (E.returnI step) push close
+    source $$ sink (E.returnI step)
   where
     send  = iterConnection conn
 
+    sink iter = await >>= maybe (close iter) (push iter)
+
     push iter bs = do
         step <- liftIO $ E.runIteratee $ E.enumList 1 [bs] E.$$ iter
         case step of
-            E.Continue _    -> return $ C.StateProcessing $ E.returnI step
-            E.Yield out inp -> return $ C.StateDone (streamToMaybe inp) out
-            E.Error e       -> C.monadThrow e
+            E.Continue _    -> sink $ E.returnI step
+            E.Yield out inp -> maybe (return ()) leftover (streamToMaybe inp) >> return out
+            E.Error e       -> liftIO $ monadThrow e
     close iter   = do
         _ <- liftIO $ E.runIteratee $ E.enumEOF E.$$ iter
         return ()
diff --git a/server.lhs b/server.lhs
--- a/server.lhs
+++ b/server.lhs
@@ -87,9 +87,7 @@
 >       } staticApp
 
 > staticApp :: Network.Wai.Application
-> staticApp = Static.staticApp Static.defaultFileServerSettings
->   { Static.ssFolder = Static.embeddedLookup $ Static.toEmbedded $(embedDir "static")
->   }
+> staticApp = Static.staticApp $ Static.embeddedSettings $(embedDir "static")
 
 When a client connects, we accept the connection, regardless of the path.
 
diff --git a/wai-websockets.cabal b/wai-websockets.cabal
--- a/wai-websockets.cabal
+++ b/wai-websockets.cabal
@@ -1,5 +1,5 @@
 Name:                wai-websockets
-Version:             1.2.0.3
+Version:             1.3.0
 Synopsis:            Provide a bridge betweeen WAI and the websockets package.
 License:             MIT
 License-file:        LICENSE
@@ -19,8 +19,8 @@
 Library
   Build-Depends:     base               >= 3        && < 5
                    , bytestring         >= 0.9.1.4
-                   , conduit            >= 0.4      && < 0.5
-                   , wai                >= 1.2      && < 1.3
+                   , conduit            >= 0.5      && < 0.6
+                   , wai                >= 1.3      && < 1.4
                    , enumerator         >= 0.4.8    && < 0.5
                    , network-enumerator >= 0.1.2    && < 0.2
                    , blaze-builder      >= 0.2.1.4  && < 0.4
@@ -28,7 +28,7 @@
                    , network            >= 2.2.1.5  && < 2.4
                    , transformers       >= 0.2      && < 0.4
                    , websockets         >= 0.6      && < 0.7
-                   , warp               >= 1.2      && < 1.3
+                   , warp               >= 1.3      && < 1.4
   Exposed-modules:   Network.Wai.Handler.WebSockets
   ghc-options:       -Wall
 
