Removed commented (and duplicate) code
Fixed issue with usergroup changing