Fix the tree rendering order