Fixes the JSON format and missing braces