Fixed a significant bug breaking the REPL