Added checkimg for mask