fixed photogallery issue