Fix bug in add_item gallery template