fixes #9: fix the situation if a document has no h1 title