Fixed issues with bignumber in math.js