fix bug in json decode