Set link

Fix some small problem in set_link