user input check fixed