Fixed parsing bug in json update function