diff --git a/Hledger/Read/JournalReader.hs b/Hledger/Read/JournalReader.hs
--- a/Hledger/Read/JournalReader.hs
+++ b/Hledger/Read/JournalReader.hs
@@ -52,9 +52,7 @@
 import Data.Time.LocalTime
 import Safe (headDef, lastDef)
 #ifdef TESTS
-import Test.HUnit
-import Test.Framework.HUnitWrapper
--- import Test.Framework
+import Test.Framework
 import Text.Parsec.Error
 #endif
 import Text.ParserCombinators.Parsec hiding (parse)
diff --git a/Hledger/Reports.hs b/Hledger/Reports.hs
--- a/Hledger/Reports.hs
+++ b/Hledger/Reports.hs
@@ -34,6 +34,7 @@
   TransactionsReport,
   TransactionsReportItem,
   triDate,
+  triBalance,
   triSimpleBalance,
   transactionsReportByCommodity,
   journalTransactionsReport,
@@ -437,6 +438,7 @@
 
 triDate (t,_,_,_,_,_) = tdate t
 triAmount (_,_,_,_,a,_) = a
+triBalance (_,_,_,_,_,a) = a
 triSimpleBalance (_,_,_,_,_,Mixed a) = case a of [] -> "0"
                                                  (Amount{aquantity=q}):_ -> show q
 
@@ -449,25 +451,34 @@
     transactionsReportCommodities (_,items) =
       nub $ sort $ map acommodity $ concatMap (amounts . triAmount) items
 
--- Remove transaction report items and item amount components that
--- don't involve the specified commodity. Other item fields like the
--- running balance and the transaction are left unchanged.
+-- Remove transaction report items and item amount (and running
+-- balance amount) components that don't involve the specified
+-- commodity. Other item fields such as the transaction are left unchanged.
 filterTransactionsReportByCommodity :: Commodity -> TransactionsReport -> TransactionsReport
 filterTransactionsReportByCommodity c (label,items) =
   (label, fixTransactionsReportItemBalances $ concat [filterTransactionsReportItemByCommodity c i | i <- items])
   where
-    filterTransactionsReportItemByCommodity c (t,t2,s,o,Mixed as,bal)
+    filterTransactionsReportItemByCommodity c (t,t2,s,o,a,bal)
       | c `elem` cs = [item']
       | otherwise   = []
       where
         cs = map acommodity as
-        item' = (t,t2,s,o,Mixed as',bal)
-        as' = filter ((==c).acommodity) as
-    fixTransactionsReportItemBalances is = reverse $ go nullmixedamt $ reverse is
+        item' = (t,t2,s,o,a',bal)
+        a' = filterMixedAmountByCommodity c a
+
+    fixTransactionsReportItemBalances [] = []
+    fixTransactionsReportItemBalances [i] = [i]
+    fixTransactionsReportItemBalances items = reverse $ i:(go startbal is)
       where
+        i:is = reverse items
+        startbal = filterMixedAmountByCommodity c $ triBalance i
         go _ [] = []
         go bal ((t,t2,s,o,amt,_):is) = (t,t2,s,o,amt,bal'):go bal' is
           where bal' = bal + amt
+
+-- | Filter out all but the specified commodity from this amount.
+filterMixedAmountByCommodity :: Commodity -> MixedAmount -> MixedAmount
+filterMixedAmountByCommodity c (Mixed as) = Mixed $ filter ((==c). acommodity) as
 
 -- | Select transactions from the whole journal for a transactions report,
 -- with no \"current\" account. The end result is similar to
diff --git a/hledger-lib.cabal b/hledger-lib.cabal
--- a/hledger-lib.cabal
+++ b/hledger-lib.cabal
@@ -1,5 +1,5 @@
 name:           hledger-lib
-version: 0.21
+version: 0.21.1
 category:       Finance
 synopsis:       Core data types, parsers and utilities for the hledger accounting tool.
 description:
