diff --git a/lib/base.php b/lib/base.php
index a7b7d08246072da98b0d6ff6063cf5a05fae8471..c8a99d3ac3058789a7d5fdbb721f8917b7b21690 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -287,7 +287,8 @@ class OC{
 		if(file_exists(OC::$APPSROOT . '/apps/' . OC::$REQUESTEDAPP . '/' . OC::$REQUESTEDFILE)){
 			require_once(OC::$APPSROOT . '/apps/' . OC::$REQUESTEDAPP . '/' . OC::$REQUESTEDFILE);
 		}else{
-			header('404 Not Found');
+			header('HTTP/1.0 404 Not Found');
+			exit;
 		}
 	}