Fixed to work with BigInts and BigDecimals