fixed friend request errors and added error checking