fixed gzip.finish() bug when not finished