Fixed a bug with user input