Fixed #139
Compression code