fix prev next button in gallery