Not so much a bug, as it probablly still "Works". But poor naming convention used, the headerIndex is reused for footers when it shoud be footerIndex. TemplateProcessor class line numbers are below. <img width="1525" alt="image" src="https://github.com/PHPOffice/PHPWord/assets/31861108/7e323a8e-eab2-4888-b5d4-18ec650e6526">