fix has_scope