diff --git a/Text/XML/Stream/Parse.hs b/Text/XML/Stream/Parse.hs
--- a/Text/XML/Stream/Parse.hs
+++ b/Text/XML/Stream/Parse.hs
@@ -173,27 +173,24 @@
 -- equivalent of <?xml for each of UTF-8, UTF-16LE/BE, and UTF-32LE/BE. It
 -- defaults to assuming UTF-8.
 detectUtf :: C.ResourceThrow m => C.Conduit S.ByteString m TS.Text
-detectUtf = C.conduitState
-    (Left id)
-    push
-    close
+detectUtf =
+    conduit id
   where
-    push (Left front) bss = do
+    conduit front = C.Conduit (push front) close
+
+    push front bss = do
         e <- getEncoding front bss
         case e of
-            Left x -> return (Left x, C.Producing [])
-            Right (bss', decode) -> push (Right decode) bss'
-    push (Right decode) bss = do
-        t <- C.conduitPush decode bss
-        return (Right decode, t)
+            Left x -> return $ C.Producing (conduit x) []
+            Right (bss', decode) -> C.conduitPush decode bss'
 
-    close _ = return []
+    close = return []
 
     getEncoding front bs'
         | S.length bs < 4 =
             return $ Left (bs `S.append`)
         | otherwise = do
-            decode <- C.prepareConduit $ CT.decode codec
+            let decode = CT.decode codec
             return $ Right (bsOut, decode)
       where
         bs = front bs'
@@ -232,7 +229,7 @@
   where
     push a b = do
         let (a', b') = go a b
-        return (a', C.Producing [b'])
+        return $ C.StateProducing a' [b']
     close _ = return []
     go True b = (True, b)
     go False b =
@@ -264,7 +261,7 @@
         go False es = EventBeginDocument : [es]
         go True es = [es]
 
-        push x es = return (True, C.Producing $ go x es)
+        push x es = return $ C.StateProducing True $ go x es
         close x = return $ go x EventEndDocument
 
 toEventC :: C.Resource m => C.Conduit (Maybe Token) m Event
@@ -279,7 +276,7 @@
          in go es' levels' ts (front . (events ++))
 
     push (es, levels) tokens =
-        return ((es', levels'), C.Producing events)
+        return $ C.StateProducing (es', levels') events
       where
         (es', levels', events) = go es levels (catMaybes [tokens]) id
 
diff --git a/Text/XML/Stream/Render.hs b/Text/XML/Stream/Render.hs
--- a/Text/XML/Stream/Render.hs
+++ b/Text/XML/Stream/Render.hs
@@ -89,7 +89,7 @@
          in go stack' atEnd rest (front . token)
 
     push (front, stack) es =
-        return ((leftover, stack'), C.Producing ts)
+        return $ C.StateProducing (leftover, stack') ts
       where
         (stack', leftover, ts) = go stack False (front [es]) id
 
@@ -205,7 +205,7 @@
   where
     push (front, a) b = do
         let (a', es) = go False a (front [b]) id
-        return (a', C.Producing es)
+        return $ C.StateProducing a' es
     close (front, a) = do
         let ((front', _), es) = go True a (front []) id
         assert (null $ front' [])
diff --git a/xml-conduit.cabal b/xml-conduit.cabal
--- a/xml-conduit.cabal
+++ b/xml-conduit.cabal
@@ -1,5 +1,5 @@
 name:            xml-conduit
-version:         0.5.1.2
+version:         0.5.2
 license:         BSD3
 license-file:    LICENSE
 author:          Michael Snoyman <michaels@suite-sol.com>, Aristid Breitkreuz <aristidb@googlemail.com>
@@ -28,9 +28,9 @@
 
 library
     build-depends:   base                      >= 4        && < 5
-                   , conduit
-                   , attoparsec-conduit        >= 0.0.0.1  && < 0.1
-                   , blaze-builder-conduit     >= 0.0      && < 0.1
+                   , conduit                   >= 0.2      && < 0.3
+                   , attoparsec-conduit        >= 0.2      && < 0.3
+                   , blaze-builder-conduit     >= 0.2      && < 0.3
                    , bytestring                >= 0.9      && < 0.10
                    , text                      >= 0.7      && < 0.12
                    , containers                >= 0.2      && < 0.5
