correct line ending handling