fixed the ordering of the nodes