Index: www/sites/all/modules/signup/signup.module
===================================================================
--- www/sites/all/modules/signup/signup.module  (revision 6223)
+++ www/sites/all/modules/signup/signup.module  (working copy)
@@ -1511,6 +1511,10 @@
  * @ingroup signup_callback
  */
 function signup_cancel_signup($uid, $nid, $anon_mail = NULL) {
+  /* I need this before the deletion in order to remove the friends firts,
+     think of it as a sort of Cascade deletion -- perrito */
+  $node = node_load($nid);
+  module_invoke_all('signup_cancel', $node, $uid, $anon_mail);
   // Delete the selected user from the log table.
   if ($anon_mail) {
     db_query("DELETE FROM {signup_log} WHERE anon_mail = '%s' AND nid = %d", $anon_mail, $nid);
@@ -1518,9 +1522,9 @@
   else {
     db_query('DELETE FROM {signup_log} WHERE uid = %d AND nid = %d', $uid, $nid);
   }
-  $node = node_load($nid);
+
   $node->signup_total--;
-  module_invoke_all('signup_cancel', $node, $uid, $anon_mail);
+  //module_invoke_all previously called here
   drupal_set_message(t('Signup to !title cancelled.', array('!title' => l($node->title, "node/$node->nid"))));
   _signup_check_limit($node, 'total');
 }

