Yet another bug fix for the link sorting.