fix weird gaps in image thumbnails