fixed link removal bug