fix merge bugs