A little better handling of user input