diff --git a/src/Data/StableTree/Types.hs b/src/Data/StableTree/Types.hs
--- a/src/Data/StableTree/Types.hs
+++ b/src/Data/StableTree/Types.hs
@@ -198,11 +198,16 @@
     let popd = Map.minViewWithKey remain >>= return . first wrapKey
     in case popd of
       Nothing ->
-        let vcount = 2 + sum (map getValueCount $ Map.elems accum)
-                       + maybe 0 (getValueCount . snd) mIncomplete
+        let vcount = (getValueCount . snd) f1
+                   + (getValueCount . snd) f2
+                   + sum (map getValueCount $ Map.elems accum)
+                   + maybe 0 (getValueCount . snd) mIncomplete
         in Left $ IBranch2 depth vcount f1 f2 accum $ wrapMKey mIncomplete
       Just ((SomeKey_T term,v), remain') ->
-        let vcount = 3 + sum (map getValueCount $ Map.elems accum)
+        let vcount = (getValueCount . snd) f1
+                   + (getValueCount . snd) f2
+                   + sum (map getValueCount $ Map.elems accum)
+                   + getValueCount v
         in Right ( Branch depth vcount f1 f2 accum (term, v), remain' )
       Just ((SomeKey_N nonterm,v), remain') ->
         go f1 f2 (Map.insert nonterm v accum) remain'
diff --git a/stable-tree.cabal b/stable-tree.cabal
--- a/stable-tree.cabal
+++ b/stable-tree.cabal
@@ -2,7 +2,7 @@
 -- documentation, see http://haskell.org/cabal/users-guide/
 
 name:                stable-tree
-version:             0.3.0
+version:             0.3.1
 synopsis:            Trees whose branches are resistant to change
 -- description:         
 homepage:            https://github.com/tsuraan/stable-tree
