Fix handling of negative user input