remove invalid links