remove newline when clearing the input line