Fixes bignum conversions

Pretty much the same as PR #182, just for Bignum.