Fixed bugs in new line