validInput fix