Fixed the masking issue by moving up to grayscale.