Fix for "both" mask_type.