bugfix in parse_input method: '\r' was not stripped correctly