fixed issue with image compression