fixes prev next buttons