Fix for Image File corruption