diff --git a/bytestring-tree-builder.cabal b/bytestring-tree-builder.cabal
--- a/bytestring-tree-builder.cabal
+++ b/bytestring-tree-builder.cabal
@@ -1,5 +1,5 @@
 name: bytestring-tree-builder
-version: 0.2.7.6
+version: 0.2.7.7
 category: ByteString
 synopsis: A very efficient ByteString builder implementation based on the binary tree
 description:
diff --git a/library/ByteString/TreeBuilder/Poker.hs b/library/ByteString/TreeBuilder/Poker.hs
--- a/library/ByteString/TreeBuilder/Poker.hs
+++ b/library/ByteString/TreeBuilder/Poker.hs
@@ -35,12 +35,5 @@
 pokeTree tree ptr =
   case tree of
     E.Leaf bytes -> pokeBytes bytes ptr
-    E.Branch tree1 tree2 -> pokeTreeOnBranch tree1 tree2 ptr
+    E.Branch tree1 tree2 -> pokeTree tree1 ptr >>= pokeTree tree2
     E.Empty -> pure ptr
-
-pokeTreeOnBranch :: E.Tree -> E.Tree -> D.Ptr Word8 -> IO (D.Ptr Word8)
-pokeTreeOnBranch a b ptr =
-  case a of
-    E.Branch c d -> pokeTreeOnBranch c (E.Branch d b) ptr
-    E.Leaf bytes -> pokeBytes bytes ptr >>= pokeTree b
-    E.Empty -> pokeTree b ptr
