Bug fix on user registration when user group is required.