fix row order