Fixed an issue with null treePath on root node.