Mask erosion fix attempt