fix gzip handling