Fix the gallery function. Don't let unrelated error messages disturb us.