fixes #4186 Adding no selected roles to the granted list

Fixed the issue and pushed the code for review, please check it.