fixed the inputchecking