fixed this. I didn't add the check because it's need in order to invalidate the color.