fix Scope handling