diff --git a/Database/MongoDB/Queue.hs b/Database/MongoDB/Queue.hs
--- a/Database/MongoDB/Queue.hs
+++ b/Database/MongoDB/Queue.hs
@@ -150,7 +150,7 @@
         _ -> liftIO $ thowIO e
       )
     -}
-    eDoc <- findAndModify (select [_id := (valueAt _id origDoc)] queueCollection) {
+    eDoc <- findAndModify (select [_id := (valueAt _id origDoc)] qwCollection) {
         sort = ["$natural" =: (-1 :: Int)]
       } [ "$set" =: [handled =: True] ]
     case eDoc of
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.3.0
+version:             0.2.3.1
 synopsis:            a message queue using MongoDB
 -- description:         
 homepage:            https://github.com/docmunch/haskell-mongodb-queue
