fix some bugs with AI