added check for scope order non-emptiness