Fixed defaultdict error