Improved link handling