fix the gallery.pp