Fixing redirection macros to handle anchors