bugfix:
1.fix the bug when deleting friends in bidirection mode would cause
  an error, caused by using len() on object that has no length attr.