prev/next button visibility fix