Hide previous/next buttons when they shouldn't be available