Fixed bug when changing line