Fixed prev/next button issue