fixed tree_to_text to differentiate better between leaves and subtrees