AI not working properly