Fixes image generation