fix error when printing phylogenetic trees