Fix for convert throwing ArithmeticException