Fix active link determination