--- userpoints.module	2008-01-06 07:26:04.000000000 -0700
+++ userpoints_new.module	2008-01-17 14:48:09.903853100 -0700
@@ -898,12 +898,14 @@ function userpoints_admin_txn() {
   $txn_id = (int)arg(4);
   
   $timestamp = format_date(time(), 'custom', 'Y-m-d H:i O');
-
+  if ($txn_id) {
+    $txn_user = user_load(array('uid' => $txn_id));
+  }
   if ($mode == 'edit' && $txn_id) {
     $result = db_query('SELECT * FROM {userpoints_txn} WHERE txn_id = %d', $txn_id);
     $txn = db_fetch_object($result);
     $timestamp = format_date($txn->time_stamp, 'custom', 'Y-m-d H:i O');
-    $txn_user = user_load(array('uid' => $txn->uid));
   }
 
   $form['txn_user'] = array(
