Finally fixed the JSON parsing issues