--- userpoints.module	Fri Jan 16 05:21:36 1970
+++ userpoints.module	Fri Jan 16 05:21:36 1970
@@ -1612,10 +1612,11 @@
  *          opposite transactions (sum of 0)
  */
 function userpoints_expire_transactions() {
-  $sql = "SELECT txn_id, uid, points, time_stamp, operation, description
+  $sql = "SELECT txn_id, uid, points, time_stamp, operation, description, reference, tid, entity_id, entity_type
           FROM {userpoints_txn}
           WHERE status = 0 AND expired = 0
           AND (expirydate < %d AND expirydate != 0)";
+
   $results = db_query($sql, time());
   while ($line = db_fetch_array($results)) {
     $line['time_stamp'] = format_date($line['time_stamp'], 'custom', 'Y-m-d H:i');
@@ -1637,6 +1638,10 @@
       'parent_txn_id' => $line['txn_id'],
       'moderate' => FALSE,
       'expirydate' => 0,
+      'tid' => $line['tid'],
+      'entity_id' => $line['entity_id'],
+      'entity_type' => $line['entity_type'],
+      'reference' => $line['reference'],
     );
     userpoints_userpointsapi($params);
     //Ok we've expired the entry lets update the original entry to set the expired flag
