Fix nested structure formatting