Fixed the ordering of the tree to use the correct order