Fixed some bugs in PolynomialSemiRing and PolynomialField