Changed <compress> logic for polynomials