diff --git role_change_notify.module role_change_notify.module
index c42f6ad..ccd81c7 100644
--- role_change_notify.module
+++ role_change_notify.module
@@ -99,10 +99,12 @@ function role_change_notify_action_info_alter(&$info) {
   $my_hooks = array('role_added', 'role_removed');
   $actions_to_alter = array('token_actions_message_action', 'token_actions_send_email_action');
   foreach ($actions_to_alter as $action) {
-    if (empty($info[$action]['hooks']['user'])) {
-      $info[$action]['hooks']['user'] = array();
+    if (isset($info[$action])) {
+      if (empty($info[$action]['hooks']['user'])) {
+        $info[$action]['hooks']['user'] = array();
+      }
+      $info[$action]['hooks']['user'] = array_merge($info[$action]['hooks']['user'], $my_hooks);
     }
-    $info[$action]['hooks']['user'] = array_merge($info[$action]['hooks']['user'], $my_hooks);
   }
 }
 
diff --git role_change_notify.test role_change_notify.test
index 87bde53..4e3ce7f 100644
--- role_change_notify.test
+++ role_change_notify.test
@@ -58,7 +58,9 @@ class RoleChangeNotifyTestCase extends TriggerWebTestCase {
    * Enable modules and create user with specific permissions.
    */
   function setUp() {
-    parent::setUp('role_change_notify', 'trigger', 'token', 'token_actions');
+    // parent::setUp('role_change_notify', 'trigger', 'token', 'token_actions');
+    // Testbot can't handle required contrib modules like token.
+    parent::setUp('role_change_notify', 'trigger');
     // Create user.
     $this->web_user = $this->drupalCreateUser();
     $this->admin_user = $this->drupalCreateUser(array('administer users', 'administer permissions', 'administer role change notification', 'administer actions'));
