fixed nesting of lexicon loop