Correction for min_element, stable_sort, and generate