fixed masking kernel