fix bugs compresssion method