merge_duplicate rows bug fixed