fixed a bug(link is not deleted properly)