Fix REPL processing