diff --git a/nodereference_variables.module b/nodereference_variables.module
index 4c434f5..56e6065 100644
--- a/nodereference_variables.module
+++ b/nodereference_variables.module
@@ -161,7 +161,7 @@ function nodereference_variables_return_nodes($nid, $fields = array(), $rendered
               // Load the referenced node
               $referenced_node = node_load($values['nid']);
               // Check the node is published
-              if ($referenced_node['status'] == '1') {
+              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
