Fixed exit condition in REPL.py