diff --git a/damnpacket.cabal b/damnpacket.cabal
--- a/damnpacket.cabal
+++ b/damnpacket.cabal
@@ -1,5 +1,5 @@
 name:                damnpacket
-version:             0.3.1
+version:             0.3.2
 synopsis:            Parsing dAmn packets
 license:             MIT
 license-file:        LICENSE
@@ -22,6 +22,7 @@
                   , trifecta
   hs-source-dirs:   src
   default-language: Haskell2010
+  ghc-prof-options: -xc
 
 test-suite render
   type:           exitcode-stdio-1.0
diff --git a/src/Text/Damn/Packet/Parser.hs b/src/Text/Damn/Packet/Parser.hs
--- a/src/Text/Damn/Packet/Parser.hs
+++ b/src/Text/Damn/Packet/Parser.hs
@@ -113,5 +113,6 @@
                              then replace "\n\n" "\n" s
                              else s
     where replace find rep ss = case B.breakSubstring find ss of
+              (n, b) | B.null b -> n
               (a, b) -> a <> rep <> replace find rep (B.drop (B.length find) b)
 {-# INLINE accountForLoginSpace #-}
