fix decompress function