test for tree output, bugfixes