Fixed a little bug on photogalleries