Fix for image generation.