Fix gallery data generation