Fixed some compression bugs