Fixed the way that the image gallery works.