stop code running over the end of a line