fix node ids in tree files