Fixed a bug that caused the console to execute commands twice.