bug fix gallery extension