diff --git a/module/VuFind/config/module.config.php b/module/VuFind/config/module.config.php
index b3363509ff7b7b46625a8d20625235974d08a76c..645d928a8d35e9a73d7cd99921d2de66d13c3162 100644
--- a/module/VuFind/config/module.config.php
+++ b/module/VuFind/config/module.config.php
@@ -27,9 +27,8 @@ $config = array(
         ),
     ),
     'view_manager' => array(
-        'display_not_found_reason' => true,
-        'display_exceptions'       => true,
-        'doctype'                  => 'HTML5',
+        'display_not_found_reason' => APPLICATION_ENV == 'development',
+        'display_exceptions'       => APPLICATION_ENV == 'development',
         'not_found_template'       => 'error/404',
         'exception_template'       => 'error/index',
         'template_path_stack'      => array(),
diff --git a/themes/vufind/root/templates/error/404.phtml b/themes/vufind/root/templates/error/404.phtml
index 44f590cdfbd3a923d4717724db4373342f7bd5b4..27c756e64f670ac67f4a012f481629a8d12bf86b 100644
--- a/themes/vufind/root/templates/error/404.phtml
+++ b/themes/vufind/root/templates/error/404.phtml
@@ -1,2 +1,3 @@
 <h1><?=$this->transEsc('An error has occurred')?></h1>
-<h2><?=$this->transEsc($this->message)?></h2>
\ No newline at end of file
+<h2><?=$this->transEsc($this->message)?></h2>
+<? if (isset($this->reason) && $this->reason): ?><b><?=$this->transEsc('Message')?>:</b> <?=$this->transEsc($this->reason)?><? endif; ?>