fixed small bug where same line was repeated over and over