Performance improvement on mask selection.