fixed prev and next button hide/show