Fix bug in user group permission setting