Fixed crash when compressing with GZip format.