fix pages sort