Fixed a bug in enableCompression method