fixes #3060 Removing multiple roles removes N-1 roles

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