fix merge sort bug