Minor bug fix in JSON parsing