Fix broken XML structure