fixed code for multiple footnotes (now compatible with bidi and hyperref)