Fix read/write to masking register