removes previous links that should be replaced