Fixed not initializing defaultdict.