fixed tree query to include join, instead of lazy loading