Fix problems when merging