Improves newline handling