diff --git a/privatemsg.module b/privatemsg.module
index 2a54f65..c6cb76f 100644
--- a/privatemsg.module
+++ b/privatemsg.module
@@ -97,7 +97,7 @@ function _privatemsg_generate_user_array($string, $slice = NULL) {
       list($type, $id) = explode('_', $uid);
       $type_info = privatemsg_recipient_get_type($type);
       if ($type_info && isset($type_info['load']) && is_callable($type_info['load'])) {
-        $temp_load = $type_info['load'](array($id));
+        $temp_load = $type_info['load'](array($id), $type);
         if ($participant = array_shift($temp_load)) {
           $participants[privatemsg_recipient_key($participant)] = $participant;
         }
@@ -631,7 +631,7 @@ function privatemsg_cron() {
   foreach ($rows as $row) {
     $type = privatemsg_recipient_get_type($row->type);
     if (isset($type['load']) && is_callable($type['load'])) {
-      $loaded = $type['load'](array($row->recipient));
+      $loaded = $type['load'](array($row->recipient), $row->type);
       if (empty($loaded)) {
         continue;
       }
@@ -872,7 +872,7 @@ function _privatemsg_load_thread_participants($thread_id, $account, $ignore_hidd
   foreach ($to_load as $type => $ids) {
     $type_info = privatemsg_recipient_get_type($type);
     if (isset($type_info['load']) && is_callable($type_info['load'])) {
-      $loaded = $type_info['load']($ids);
+      $loaded = $type_info['load']($ids, $type);
       if (is_array($loaded)) {
         $participants += $loaded;
       }
diff --git a/privatemsg.pages.inc b/privatemsg.pages.inc
index 162aba1..3d6efe1 100644
--- a/privatemsg.pages.inc
+++ b/privatemsg.pages.inc
@@ -748,7 +748,7 @@ function privatemsg_autocomplete($string) {
     foreach ($types as $name => $type) {
       if (isset($type['autocomplete']) && is_callable($type['autocomplete']) && privatemsg_recipient_access($name, 'write')) {
         $function = $type['autocomplete'];
-        $return = $function($fragment, $names, $remaining);
+        $return = $function($fragment, $names, $remaining, $name);
         if (is_array($return) && !empty($return)) {
           $matches = array_merge($matches, $return);
         }
diff --git a/privatemsg_roles/privatemsg_roles.module b/privatemsg_roles/privatemsg_roles.module
index c081360..f2b1033 100644
--- a/privatemsg_roles/privatemsg_roles.module
+++ b/privatemsg_roles/privatemsg_roles.module
@@ -85,7 +85,7 @@ function privatemsg_roles_write_access($recipient) {
 /**
  * Load a number of roles based on their rid.
  */
-function privatemsg_roles_load_multiple($rids) {
+function privatemsg_roles_load_multiple($rids, $type) {
   $result = db_query("SELECT name, rid AS recipient FROM {role} WHERE rid IN (:rids)", array(':rids' => $rids));
 
   $roles = array();
@@ -143,7 +143,7 @@ function privatemsg_roles_count_recipients($recipient) {
 /**
  * Provides autocomplete suggestions for roles.
  */
-function privatemsg_roles_autocomplete($fragment, $names, $limit) {
+function privatemsg_roles_autocomplete($fragment, $names, $limit, $type) {
   $result = _privatemsg_assemble_query(array('autocomplete_roles', 'privatemsg_roles'), $fragment, $names)
     ->range(0, $limit)
     ->execute();
