fix merge algorithm