Fix image conversion