diff --git a/Database/MongoDB/Queue.hs b/Database/MongoDB/Queue.hs
--- a/Database/MongoDB/Queue.hs
+++ b/Database/MongoDB/Queue.hs
@@ -133,11 +133,10 @@
 nextDoc cursor = do
   n <- next cursor
   case n of
-    Nothing -> liftIO $ throwIO $ TailableCursorError "tailable cursor ended"
+    Nothing -> nextDoc cursor
     (Just doc) -> return doc
 
 data MongoQueueException = FindAndModifyError String
-                         | TailableCursorError String
                          deriving (Show, Typeable)
 instance Exception MongoQueueException
 
@@ -149,7 +148,7 @@
 nextFromQueue QueueWorker {..} = qwRunDB $ do
     origDoc <- nextDoc qwCursor {-`catch` (\e ->
       case e of
-        TailableCursorError "tailable cursor ended" -> do
+         dead cursor
           cursor <- getCursor
         _ -> liftIO $ thowIO e
       )
diff --git a/mongodb-queue.cabal b/mongodb-queue.cabal
--- a/mongodb-queue.cabal
+++ b/mongodb-queue.cabal
@@ -2,7 +2,7 @@
 -- documentation, see http://haskell.org/cabal/users-guide/
 
 name:                mongodb-queue
-version:             0.2.0.0
+version:             0.2.0.1
 synopsis:            a queue using MongoDB
 -- description:         
 homepage:            https://github.com/gregwebs/haskell-mongodb-queue
diff --git a/test/main.hs b/test/main.hs
--- a/test/main.hs
+++ b/test/main.hs
@@ -5,6 +5,7 @@
 import Prelude hiding (lookup)
 import Database.MongoDB
 import Database.MongoDB.Queue
+import Control.Concurrent
 
 
 main :: IO ()
@@ -18,3 +19,14 @@
       doc <- nextFromQueue worker
       Just world <- lookup ("hello" :: Text) doc 
       world `shouldBe` ("world" :: Text)
+
+    it "should wait for a document to be inserted" $ do
+      emitter <- createEmitter runDB
+      worker <- createWorker runDB
+      forkIO $ do
+        threadDelay $ 1 * 1000 * 1000 -- microseconds, 1 second
+        emit emitter [("hello" :: Text) =: ("world" :: Text)]
+      doc <- nextFromQueue worker
+      Just world <- lookup ("hello" :: Text) doc 
+      world `shouldBe` ("world" :: Text)
+      return ()
