Fix bug in JSON parsing.