fix crashing bug with when trailing newline is classic mac style