Fixed crash decoding corrupted image