fixed JSON parsing