diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,10 @@
 The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
 and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html)
 
+## 0.52.8
+### Fixed
+- Fix special case for zero limit.
+
 ## 0.52.7
 ### Fixed
 - Fix cache bug when too many transactions in mempool.
diff --git a/haskoin-store.cabal b/haskoin-store.cabal
--- a/haskoin-store.cabal
+++ b/haskoin-store.cabal
@@ -4,10 +4,10 @@
 --
 -- see: https://github.com/sol/hpack
 --
--- hash: 5f0ea1670ea6d31290e445fbdbf155ec7d7383d84e5ba559c87dfb3fbf14266a
+-- hash: c8fe3483aabbe886987fbd5e92892220278501964337c361013c010df920d472
 
 name:           haskoin-store
-version:        0.52.7
+version:        0.52.8
 synopsis:       Storage and index for Bitcoin and Bitcoin Cash
 description:    Please see the README on GitHub at <https://github.com/haskoin/haskoin-store#readme>
 category:       Bitcoin, Finance, Network
diff --git a/src/Haskoin/Store/Cache.hs b/src/Haskoin/Store/Cache.hs
--- a/src/Haskoin/Store/Cache.hs
+++ b/src/Haskoin/Store/Cache.hs
@@ -403,8 +403,11 @@
                   else []
         return
             $ map (uncurry f)
-            $ take (fromIntegral (limit limits))
+            $ l
             $ drop (fromIntegral (offset limits)) xs'
+    l = if limit limits > 0
+        then take (fromIntegral (limit limits))
+        else id
     f t s = TxRef {txRefHash = t, txRefBlock = scoreBlockRef s}
 
 cacheGetXPubUnspents ::
@@ -447,8 +450,11 @@
                   else []
         return
             $ map (uncurry f)
-            $ take (fromIntegral (limit limits))
+            $ l
             $ drop (fromIntegral (offset limits)) xs'
+    l = if limit limits > 0
+        then take (fromIntegral (limit limits))
+        else id
     f o s = (scoreBlockRef s, o)
 
 redisGetXPubBalances :: (Functor f, RedisCtx m f) => XPubSpec -> m (f [XPubBal])
