Fix pretty printing of trees