fix unsorted page listing and python