fix color logic