fixing a small glitch with the gallery