Improved link validity checking.