Fix bugs of verifing user's role.