Copied the code from OperationMerge to fix synchronization

for #614