Correcting headings hierarchy