gallery fix for loads of images