Fixing issues of email sending and support for editing role names