Fix ai getting stuck in idle forever.