diff --git a/services.module b/services.module
index 8fbf547..9ccb695 100644
--- a/services.module
+++ b/services.module
@@ -202,8 +202,8 @@ function services_endpoint_callback($endpoint_name) {
     print call_user_func($server . '_server');
 
     // Do not let this output
-    module_invoke_all('exit');
-    exit;
+    drupal_page_footer();
+    exit();
   }
   // return 404 if the server doesn't exist
   drupal_not_found();
