Fix previous/next buttons.