bugfix: correctly identify sections and subsections