fix gallery from json