fix a bug in the use of mpz_invert