Fix bug for scope.