fix not inputting a valid integer for min max && adapt a '1-100' to 'num0-num1'

Signed-off-by: Liew Zhao Wei <zhaoweiliew@gmail.com>