fixed wrong variable on compressing snapshot and linking