fix invert color bug introduced in last commit