fix longstanding issues with console EOL handling