Fixed bug in set_link().