solve a bug in json file generator