Img generation fix