fixes in treequery