Fix previous/next page buttons.