thumbnail generation fix