fix repl bug