Fixed bug where create group does not check if code already exists.