bugfix for imagegrid