fix bug in json creator