Index: popups_reference.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/popups_reference/popups_reference.module,v
retrieving revision 1.4.2.2
diff -u -p -w -r1.4.2.2 popups_reference.module
--- popups_reference.module	21 Mar 2009 01:03:20 -0000	1.4.2.2
+++ popups_reference.module	11 Jun 2009 15:15:06 -0000
@@ -92,8 +92,8 @@ function popups_reference_alter_item(&$f
     if ($links) {
       // Put the nodereference widget and links in an wrapper.
       // Makes it easy to find for Ahah targeting, and popups_reference behavior selecting.
-      $form[$key]['#prefix'] = '<div class="'. $wrapper_id .'">';
-      $form[$key]['#suffix'] = '<div>Add New: ' . implode(', ', $links) .'</div></div>';
+      $form[$key]['#prefix'] .= '<div class="'. $wrapper_id .'">';
+      $form[$key]['#suffix'] = '<div>Add New: ' . implode(', ', $links) .'</div></div>'. (!empty($form[$key]['#suffix']) ? $form[$key]['#suffix'] : '');
     }
   }
 }
@@ -150,4 +150,3 @@ function _popups_reference_counter() {
   static $count = 0;
   return $count++;
 }
-
