Defining scopes corrected