Remove unused parameter
Fix bug: properly handle commands even if AIs exit