fixed some ai stuff