fixed bugs - null check in poll_for_invites and add_friend, lowercase in allowed_files