add code path if entered a negative integer

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