fixing issue where an invalid input would cascade through subsequent invalid inputs