fix incorrect ordering