diff --git a/Language/Bash/PrettyPrinter.hs b/Language/Bash/PrettyPrinter.hs
--- a/Language/Bash/PrettyPrinter.hs
+++ b/Language/Bash/PrettyPrinter.hs
@@ -99,7 +99,7 @@
     Group t                 ->  curlyOpen >> pp t     >> curlyClose >> outdent
     Subshell t              ->  roundOpen >> pp t     >> roundClose >> outdent
     Function ident t        ->  do wordcat ["function ", bytes ident]
-                                   inword " {" >> pp t >> outword "}"
+                                   inword "{" >> pp t >> outword "}"
     IfThen t t'             ->  do hangWord "if" >> pp t  >> outdent >> nl
                                    inword "then" >> pp t' >> outword "fi"
     IfThenElse t t' t''     ->  do hangWord "if" >> pp t >> outdent >> nl
@@ -160,13 +160,13 @@
                    , case target of Left expr -> bytes expr
                                     Right fd' -> '&' `cons` bytes fd' ]
 
-quote b                      =  '"' `cons` b `snoc` '"'
+quote b                      =  cons '"' b `snoc` '"'
 
 braces b                     =  "${" `append` b `snoc` '}'
 
 braces0 b                    =  "${" `append` b `append` ":-}"
 
-brackets b                   =  '[' `cons` b `snoc` ']'
+brackets b                   =  cons '[' b `snoc` ']'
 
 identpart (VarSpecial special) = (drop 1 . bytes) special
 identpart (VarIdent ident)   =  bytes ident
diff --git a/Language/Bash/PrettyPrinter/State.hs b/Language/Bash/PrettyPrinter/State.hs
--- a/Language/Bash/PrettyPrinter/State.hs
+++ b/Language/Bash/PrettyPrinter/State.hs
@@ -93,7 +93,7 @@
        | otherwise           =  ""
   sappend = mappend string . Builder.fromByteString . mappend sSep
   tSafe list                 =  if null list then [] else List.tail list
-  sNL                        =  sappend "\n"
+  sNL                        =  mappend string (Builder.fromByteString "\n")
   curly_s                    =  sappend (mappend dent "{")
   s_curly                    =  sappend ";}"
   round_s                    =  sappend (mappend dent "(")
diff --git a/bash.cabal b/bash.cabal
--- a/bash.cabal
+++ b/bash.cabal
@@ -1,5 +1,5 @@
 name                          : bash
-version                       : 0.1.4
+version                       : 0.1.5
 category                      : Language
 license                       : BSD3
 license-file                  : LICENSE
