Moved newline code into a safer if block