--- modules/dynamic_background_node/dynamic_background_node.module.patch	2016-10-11 09:36:17.894987784 +0200
+++ modules/dynamic_background_node/dynamic_background_node.module	2016-10-11 10:44:08.961906086 +0200
@@ -201,14 +201,14 @@
  * Implements hook_dynamic_background_css().
  */
 function dynamic_background_node_dynamic_background_css($vars) {
-  // Find the selected image id.
-  $fid = NULL;
-  if (isset($vars['node'])) {
-    $node = $vars['node'];
+  $node = isset($vars['node']) ? $vars['node'] : NULL;
+  if (!isset($node)) {
+    $node = menu_get_object('node');
+  }
 
+  if (isset($node)) {
     // Get active image an return information.
     $image = dynamic_background_active_image('node', $node->nid);
-
     // If no image have been found try to select random image (if configured).
     $image_behaviour = variable_get('dynamic_background_node_image_behaviour', array());
     if (!$image && (isset($image_behaviour['random']) && $image_behaviour['random'])) {
