Fix bignum memory corruption