Fixed bug with wrong user input