Fixed bug that causes bot to stop attacking

Fixed bug that caused the bot to stop attacking.