                 
                 # reset the space left and buffer
                 if bk.required
+                    @spaceLeft = @lineWidth
                     buffer = ''
                     textWidth = 0
                     wc = 0
                 else
                     # reset the space left and buffer
-                    spaceLeft = @lineWidth - w
+                    @spaceLeft = @lineWidth - w
                     buffer = word
                     textWidth = w
                     wc = 1
             else
-                spaceLeft -= w
-                
-            last = bk
+                @spaceLeft -= w
             
         if wc > 0
             @emit 'lastLine', options, this

                @document.y += options.paragraphGap or 0
                options.align = align
                @lastLine = false
        
    wrap: (text, options) ->
        # override options from previous continued fragments

            options.lineWidth = @lineWidth
            y = @document.y
            @emit 'line', buffer, options, this
            
        @emit 'sectionStart', options, this
        
        @eachWord text, (word, w, bk, last) =>
            if not last? or last.required
                @emit 'firstLine', options, this
                @spaceLeft = @lineWidth
            
            if w <= @spaceLeft
                buffer += word
                textWidth += w
                wc++
                            
            if bk.required or w > @spaceLeft
                if bk.required
                    @emit 'lastLine', options, this
                
