msd_sort still has problems