bug fix for compressed images