corrected plotting of mask