Fixed line ending problems