fixing on the fly mask change feature.