repair after merge