fix for trailing newline character in repl