fix the addFriend logic