Bug fix: if we're outside of the mask and it is inverted use 1