merge_sort fix and tests