Fix the isLink function