Fix bug when footnotes are active