--- uc_node_access_acl.module.init      2013-07-02 16:59:04.000000000 -0400
+++ uc_node_access_acl.module   2013-07-02 17:26:02.000000000 -0400
@@ -69,5 +69,27 @@ function uc_node_access_acl_form_alter(&

     // Stuff the data back in the form.
     $form['acl']['view']['user_list']['#default_value'] = serialize($users);
+
+    // Also add in our own submit handler so we can clean up expirations
+    $form['#submit'][] = 'uc_node_access_acl_form_submit';
   }
 }
+
+function uc_node_access_acl_form_submit($form, &$form_state) {
+  $node = $form_state['node'];
+
+  // look at all users that are currently able to view in the ACL list
+  $users = unserialize($form_state['values']['acl']['view']['user_list']);
+
+  // Load up all the expirations for this node so they can be checked if they have been manually removed
+  $result = db_query("SELECT uid, expiration FROM {uc_node_access_expirations} WHERE access_nid = %d", $node->nid);
+  while ($row = db_fetch_array($result)) {
+    // If any of the users in uc_node_access_expirations are not in this ACL list, remove them
+    if (!array_key_exists($row['uid'], $users)) {
+      $account = user_load($row['uid']);
+      db_query("DELETE FROM {uc_node_access_expirations} WHERE uid = %d AND access_nid = %d", $account->uid, $node->nid);
+      ca_pull_trigger('uc_node_access_revoke', $node, $account);
+    }
+  }
+}
+