Change how to find links to be more robust