fix the way we deal with persisted scopes