prev and next buttons are hiding themselves when they need to
next and prev buttons hife themselves when they are supposed to
prev and next buttons work and hide themselves