next and previous buttons working in galleryView