Fix SetRole bugs