Fixed bug with user validation