Fix merge sort algorithm.