Fix Merge duplication code