fix the subtree-merge script