fix raw image creation