fix meng's data structure bugs