fixing headers, gzip decompression