Fix: Line buffer was not being exhausted.

That seemed to fixed my issues with duplicate lines. Buffer was never completely emptied, so after the first line they were all duplicates.