fix clearing of opt-out flag