redirect references instead of removing them while merging