Sort the duplicate list