Fix for tree result nesting