fixed bug in masking example