Fixed some bugs related to taking polynomials over finite fields.