Fixed up newline handling