Fix netCDF4 issue with mask