fix bug for gzip