fixed AI and some effects