bug fix for latlim_mask