fix gallery popup