To fix redraw image when you generate images with the same class generator.