fix scopes