Fixing handling of links