fixed merge bugs