Fix to bug in mergesort.