diff --git a/hasql.cabal b/hasql.cabal
--- a/hasql.cabal
+++ b/hasql.cabal
@@ -1,5 +1,5 @@
 name: hasql
-version: 1.4.5.1
+version: 1.4.5.2
 category: Hasql, Database, PostgreSQL
 synopsis: An efficient PostgreSQL driver with a flexible mapping API
 description:
diff --git a/library/Hasql/Private/Decoders/Result.hs b/library/Hasql/Private/Decoders/Result.hs
--- a/library/Hasql/Private/Decoders/Result.hs
+++ b/library/Hasql/Private/Decoders/Result.hs
@@ -164,7 +164,7 @@
         rowResult <- Row.run rowDec (result, intToRow rowIndex, maxCols, integerDatetimes)
         case rowResult of
           Left !x -> writeIORef failureRef (Just (RowError rowIndex x))
-          Right !x -> modifyIORef accRef (\acc -> step acc x)
+          Right !x -> modifyIORef' accRef (\acc -> step acc x)
       readIORef failureRef >>= \case
         Nothing -> Right <$> readIORef accRef
         Just x -> pure (Left x)
