Fixed page indexes after resorting.