fix the ordering of the branches