fix minor bug: get_tree_state();