Some AI fixes