Fix prev and next buttons