Fix LinesBuffer growing indefinitely