Amended the gallery template.