deprecate on-max-set-with mask, will be removed soon