fixed the gallery template to reflect better changes