diff --git a/sites/all/modules/contrib/noderelationships/js/noderef_dialog.js b/sites/all/modules/contrib/noderelationships/js/noderef_dialog.js
index c99f972..057f48c 100644
--- a/sites/all/modules/contrib/noderelationships/js/noderef_dialog.js
+++ b/sites/all/modules/contrib/noderelationships/js/noderef_dialog.js
@@ -65,6 +65,16 @@ Drupal.behaviors.nodeRelationshipsReferenceDialog = function(context) {
  */
 Drupal.nodeRelationshipsReferenceDialog.initializeTable = function(table) {
   var self = this;
+  
+  // When the view is loaded using ajax it doesn't come back with the proper classes, add them.
+  sanityCheck = $('td.views-field-noderelationships-nid', table);
+  if (sanityCheck[0] == null) {  
+    $('td.nid').addClass('views-field-noderelationships-nid');
+    $('td.title:nth-child(even)').addClass('views-field-noderelationships-title');
+    $('th.nid').addClass('views-field-noderelationships-nid');
+    $('th.title:nth-child(even)').addClass('views-field-noderelationships-title');
+  };
+  
   $('td.views-field-noderelationships-nid', table).each(function() {
     var $nidCell = $(this), $row = $nidCell.parents('tr:first'), $titleCell = $('td.views-field-noderelationships-title', $row);
 
