.tree logic fix