diff --git a/privatemsg_realname/privatemsg_realname.module b/privatemsg_realname/privatemsg_realname.module
index c85b420..ccc9576 100644
--- a/privatemsg_realname/privatemsg_realname.module
+++ b/privatemsg_realname/privatemsg_realname.module
@@ -7,7 +7,8 @@ function privatemsg_realname_privatemsg_name_lookup($string) {
 
   // First, check the unique version.
   if (preg_match('/\[user:(.+)\]/', $string, $match)) {
-    $account = reset(user_load_multiple(array(), array(variable_get('privatemsg_realname_unique_identifier', 'name') => trim($match[1]))));
+    $account = user_load_multiple(array(), array(variable_get('privatemsg_realname_unique_identifier', 'name') => trim($match[1])));
+    $account = reset($account);
     if ($account && $account->uid) {
       $account->type = 'user';
       $account->recipient = $account->uid;
