correct error while mergin