fixed ai problems