diff --git a/fb_stream.module b/fb_stream.module
index 9864f17..10791c3 100644
--- a/fb_stream.module
+++ b/fb_stream.module
@@ -56,7 +56,11 @@ function fb_stream_permission() {
  * Post to facebook stream when new node is created.
  */
 function fb_stream_node_insert($node) {
-  if (TRUE) { // Maintain same level of indentation as D6 branch, so that patches easily apply.
+  drupal_register_shutdown_function('fb_stream_post_on_shutdown',$node);
+}
+
+function fb_stream_post_on_shutdown($node) {
+    if (TRUE) { // Maintain same level of indentation as D6 branch, so that patches easily apply.
     if (!empty($node->fb_stream_do_post)) {
       $node_url = url("node/$node->nid", array('absolute' => TRUE));
 
@@ -114,8 +118,6 @@ function fb_stream_node_insert($node) {
     }
   }
 }
-
-
 /**
  * Implements hook_node_update().
  *
