Fixed panic when input number is zero.