fixed a bug with the compression