Fix bug for gmp