Corrections in the previous/next pages handling