fixed to work with footnote counter