Bugfix in setScope()