diff --git a/nodereference_variables.module b/nodereference_variables.module
index 8a67308..4c434f5 100644
--- a/nodereference_variables.module
+++ b/nodereference_variables.module
@@ -158,10 +158,15 @@ function nodereference_variables_return_nodes($nid, $fields = array(), $rendered
           foreach ($thisfield as $key => $values) {
             // just double-check there is actually a value
             if ($values['nid']) {
-              // add the node object to our output array
-              $output[$field][$key]['node'] = node_load($values['nid']);
-              // add a flag to say this is a tabbed node
-              $output[$field][$key]['node']->tabbed = TRUE;
+              // Load the referenced node
+              $referenced_node = node_load($values['nid']);
+              // Check the node is published
+              if ($referenced_node['status'] == '1') {
+                // add the node object to our output array
+                $output[$field][$key]['node'] = $referenced_node;
+                // add a flag to say this is a tabbed node
+                $output[$field][$key]['node']->tabbed = TRUE;
+              }
               if ($rendered) {
                 // add the rendered node for display to our output array
                 $output[$field][$key]['node_rendered'] = node_view($output[$field][$key]['node']);
