Fixed some bugs in AddFriend.