Tweaks to masking