Fixed error when color change