fix gallery overflow