fix error scopes & roles