Fix to getMask method.