fixed bug in repl