fix gallery size problem