Fix some merge bugs