Fixed bug in set_friend()