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.15.1
+### Changed
+- Fix duplicate coinbase transaction id bug.
+
 ## 0.15.0
 ### Removed
 - `PreciseUnixTime` data type no longer exists.
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: f29fa6f913716a037b1af6dd5464ed228c7584d7dffadad6b80404d0efcd3f2c
+-- hash: e7b8e1136ee2c05c5f2395b5c1b3b5cf6375e519fce16db05a7d0d3df7c487f5
 
 name:           haskoin-store
-version:        0.15.0
+version:        0.15.1
 synopsis:       Storage and index for Bitcoin and Bitcoin Cash
 description:    Store blocks, transactions, and balances for Bitcoin or Bitcoin Cash, and make that information via REST API.
 category:       Bitcoin, Finance, Network
diff --git a/src/Network/Haskoin/Store/Logic.hs b/src/Network/Haskoin/Store/Logic.hs
--- a/src/Network/Haskoin/Store/Logic.hs
+++ b/src/Network/Haskoin/Store/Logic.hs
@@ -233,17 +233,14 @@
             }
     insertAtHeight (headerHash (nodeHeader n)) (nodeHeight n)
     setBest (headerHash (nodeHeader n))
-    zipWithM_
-        (\x t -> import_or_confirm (br x) t)
-        [0 ..]
-        (sortTxs (blockTxns b))
+    zipWithM_ import_or_confirm [0 ..] (sortTxs (blockTxns b))
   where
-    import_or_confirm b tx =
+    import_or_confirm x tx =
         getTxData (txHash tx) >>= \case
             Just t
-                | not (txDataDeleted t) -> confirmTx net t b tx
+                | x > 0 && not (txDataDeleted t) -> confirmTx net t (br x) tx
             _ ->
-                importTx net b (fromIntegral (blockTimestamp (nodeHeader n))) tx
+                importTx net (br x) (fromIntegral (blockTimestamp (nodeHeader n))) tx
     subsidy = computeSubsidy net
     cb_out_val = sum (map outValue (txOut (head (blockTxns b))))
     ts_out_val = sum (map (sum . map outValue . txOut) (tail (blockTxns b)))
