prev, next button bug fixed