fixed some line changing bugs