Copied the code from OperationMerge
Merge pull request #615 from abersnaze/issue614

Copied the code from OperationMerge to fix synchronization