fixes scopes