Some fixes on the REPL