Fixed some bugs in link edition