diff --git a/inc/Action/Sitemap.php b/inc/Action/Sitemap.php
index 025c5153c9d59a4f7bad216fc5554f8114ef08b4..10b1377a080299b8c5ed41c1e63a33895778992e 100644
--- a/inc/Action/Sitemap.php
+++ b/inc/Action/Sitemap.php
@@ -29,7 +29,7 @@ class Sitemap extends AbstractAction {
         global $conf;
 
         if($conf['sitemap'] < 1 || !is_numeric($conf['sitemap'])) {
-            throw new FatalException(404, 'Sitemap generation is disabled');
+            throw new FatalException('Sitemap generation is disabled', 404);
         }
 
         $sitemap = \Sitemapper::getFilePath();
@@ -59,7 +59,7 @@ class Sitemap extends AbstractAction {
             exit;
         }
 
-        throw new FatalException(500, 'Could not read the sitemap file - bad permissions?');
+        throw new FatalException('Could not read the sitemap file - bad permissions?');
     }
 
 }