some bugfixes to headings