Improved handling of dynamic headings for slides