somehow scopes are not saved into the db