fixed AI issues