Fixed handlers for the gallery.