Fixed out of range ai behavior