gzip feature and minor fixes

please fix this