FIX encoding
Fix some bugs into treeobject