Fixing error with user registration