fixed some repl bugs