fix colorpicker and memory leaks