fixed node IDs in tree.py