minor fixes to tree functions
Merge pull request #128 from opentechinstitute/tree-fixes

minor fixes to tree functions