fix bug in JSON for update