Derpy coding was causing derpiness with AI state-changing.  Mostly fixed now.