diff --git a/snaplet-hdbc.cabal b/snaplet-hdbc.cabal
--- a/snaplet-hdbc.cabal
+++ b/snaplet-hdbc.cabal
@@ -1,5 +1,5 @@
 name:           snaplet-hdbc
-version:        0.6.2.1
+version:        0.6.2.2
 synopsis:       HDBC snaplet for Snap Framework
 description:    This snaplet consists of two parts: an HDBC abstraction snaplet
                 and an HDBC authentication backend for Snap's authentication
diff --git a/src/Snap/Snaplet/Auth/Backends/Hdbc.hs b/src/Snap/Snaplet/Auth/Backends/Hdbc.hs
--- a/src/Snap/Snaplet/Auth/Backends/Hdbc.hs
+++ b/src/Snap/Snaplet/Auth/Backends/Hdbc.hs
@@ -229,10 +229,10 @@
                                      ,  toSql $ userPassword au]
             fetchRow stmt'
           nid  <- case rw of
-                  Nothing     -> fail $  "Failed to fetch the newly inserted row. " ++
-                                         "It might not have been inserted at all."
-                  Just []     -> fail "Something went wrong"
-                  Just (x:_)  -> return (fromSql x :: Text)
+                    Nothing     -> fail $  "Failed to fetch the newly inserted row. " ++
+                                           "It might not have been inserted at all."
+                    Just []     -> fail "Something went wrong"
+                    Just (x:_)  -> return (fromSql x :: Text)
           return $ au { userId = Just (UserId nid) }
 
   lookupByUserId mgr@(HdbcAuthManager _ tbl qs) uid = authQuery mgr $
@@ -249,11 +249,12 @@
   return ()
 
 authQuery :: HdbcAuthManager -> (String, [SqlValue]) -> IO (Maybe AuthUser)
-authQuery (HdbcAuthManager pool tbl _) (qry, vals) = withResource pool $
-  \conn -> do
-    stmt  <- prepare conn qry
-    _     <- execute stmt vals
-    res <- fetchRowMap stmt
+authQuery (HdbcAuthManager pool tbl _) (qry, vals) =
+  withResource pool $ \conn -> do
+    res <- do
+      stmt  <- prepare conn qry
+      _     <- execute stmt vals
+      fetchRowMap stmt
     return $ (return . mkUser tbl) =<< res
 
 mkUser :: AuthTable -> Map String SqlValue -> AuthUser
