Fix problem with AI