fixed the merge sort