Fixes bug that was generating erroneous anchor tags. Props to Alan Howard for catching the bug.