some fixes on tree
Merge pull request #52 from arnaudbey/tree_fixes

some fixes on tree