fixing invalid JSON formatting