Fixed a bug in Safari when changing color