Merging patches