fixed bug in get_subtree