Maybe you should trim the user inputs?