added gzip compression and fixed alert error