fixed ai bug thingy

more code in title than commit!