fixed bug of mask