Refactor merge fixes