Fix resize and gallery