fixing scopes