fix g_root issue, still slow and cannot go beyond 8192 nodes