fixed the tree function output of newick format