Swap head/tail on "up" links

Previous change for #1824 ended up with head/tail labels on the wrong ends
Merge pull request #21 from candlerb/candlerb/1822bis

Swap head/tail on "up" links