Fixed gendict bug