fixed merge sort