Fixes unable to save selected groups in registering new user