Fix issues with newline mode.