diff --git a/includes/batch.inc b/includes/batch.inc
index e89ab8d..3314999 100644
--- a/includes/batch.inc
+++ b/includes/batch.inc
@@ -51,8 +51,8 @@ function _batch_page() {
   if (!$batch) {
     $batch = batch_load($_REQUEST['id']);
     if (!$batch) {
-      drupal_set_message(t('No active batch.'), 'error');
-      drupal_goto();
+      drupal_not_found();
+      drupal_exit();
     }
   }
 
