Fix broken gallery view