Modified fix for image grid refreshing