tries to fix gallery appearance