Fixed exceptions (throws ArithmeticError instead of ValueError)