Fix nesting of JSON