cleanup flags