Fix bug in remove_uniques.