fix recursion error in OrderedDictionary