Fixing JSON formatting issues