fixed photogallery bug