If the value was 10 digits long it caused an overflow in the multiply loop. The case is now tested before looping over.