gr_find_closest_color did not need it. Remove it. For the others, resetting the count is sufficient. There is no need to reset the individual elements.