bug fix for repl