Fixed error that caused the bot to crash.