Fix clearing of headings