fix error when user registration form submitted with no values