Modify code to work with non-sis scopes