Modified auto merge