fix gallery in backend