fixes image file type problem