more fixing in tree.h