Fixed a link handling bug