many ai fixes