Fix crash when adding a new color.