fixed canvas masking problem