Fix REPL bug