fix broken link handling