Fix for footnote anchor

I've seen another pull request regarding this issue but the fix seems to introduce a new bug. This should fix the footnote bug when clicking back and forth between footnote & footnote anchors (current version links to the wrong footnotes). 

This fix does not correct the numbering, which is wrong. `#fn-0` is the first footnote. This should not be zero-based, right?