Fix crashes caused by color selecting mode.