clean up the card flags set in AI