diff --git a/uc_roles.ca.inc b/uc_roles.ca.inc
index 846f396..2ca2967 100644
--- a/uc_roles.ca.inc
+++ b/uc_roles.ca.inc
@@ -454,7 +454,7 @@ function ca_build_email_form($form_state, $settings, $token_filters) {
  *   An Ubercart order object.
  * @see uc_roles_action_order_renew_form()
  */
-function uc_roles_action_order_renew($order) {
+function uc_roles_action_order_renew($order, $settings) {
   // Load the order's user and exit if not available.
   if (!($account = user_load($order->uid))) {
     return;
@@ -471,30 +471,32 @@ function uc_roles_action_order_renew($order) {
         continue;
       }
 
-      // Determine the expiration timestamp for the role.
-      $expiration = _uc_roles_product_get_expiration($role, $product->qty, $existing_role->expiration);
-
-      // Grant the role to the user.
-      uc_roles_grant($account, $role->rid, $expiration, TRUE, !$settings['message']);
-
-      // Get the new expiration (if applicable)
-      $new_expiration = db_fetch_object(db_query("SELECT * FROM {uc_roles_expirations} WHERE uid = %d AND rid = %d", $account->uid, $role->rid));
-
-      // Trigger role email.
-      ca_pull_trigger('uc_roles_notify_'. $op, $order, $new_expiration);
-
       // Leave an order comment.
       $existing_role = db_fetch_object(db_query("SELECT * FROM {uc_roles_expirations} WHERE uid = %d AND rid = %d", $account->uid, $role->rid));
+
+      // Determine the expiration timestamp for the role.
+      $expiration = _uc_roles_product_get_expiration($role, $product->qty);
+
       if (!is_null($existing_role->expiration)) {
         $op = 'renew';
         $comment = t('Customer user role %role renewed.', array('%role' => _uc_roles_get_name($role->rid)));
+        // Grant the role to the user.
+        uc_roles_renew($account, $role->rid, $expiration);
       }
       else {
         $op = 'grant';
         $comment = t('Customer granted user role %role.', array('%role' => _uc_roles_get_name($role->rid)));
+        // Grant the role to the user.
+        uc_roles_grant($account, $role->rid, $expiration, TRUE, !$settings['message']);
       }
 
       uc_order_comment_save($order->order_id, $user->uid, $comment);
+
+      // Get the new expiration (if applicable)
+      $new_expiration = db_fetch_object(db_query("SELECT * FROM {uc_roles_expirations} WHERE uid = %d AND rid = %d", $account->uid, $role->rid));
+
+      // Trigger role email.
+      ca_pull_trigger('uc_roles_notify_'. $op, $order, $new_expiration);
     }
   }
 }
