For ENG-5962, fix merge bugs