Fix REPL crash