JBYung - Fixed issue with AI logic