fixed some errors in the addrequest and addfriend functions