Fixed TreeNodeState to handle real world data.