Fixed role checking bug.