Fix problem with invalid JSON format