Fixed a bug related to the scope.