More cleanup and fix the result from uncompressed images.