bug correction in link deletion