fixed tree.js objectification