fixed AI flight bug