Fixed bad 500 during adding roles.
Merge branch 'test' into dev