Fix error sorting pages