Index: branches/stable/cgi-bin/main.cgi
===================================================================
--- branches/stable/cgi-bin/main.cgi	(revision 162)
+++ branches/stable/cgi-bin/main.cgi	(revision 163)
@@ -1150,8 +1150,9 @@
   };
   if ($@) {
-    carp "Transaction aborted because $@";
+    my $msg = $@;
+    carp "Transaction aborted because $msg";
     eval { $ip_dbh->rollback; };
-    syslog "err", "$authuser could not update block/IP '$webvar{block}': '$@'";
-    printError("Could not update block/IP $webvar{block}: $@");
+    syslog "err", "$authuser could not update block/IP '$webvar{block}': '$msg'";
+    printError("Could not update block/IP $webvar{block}: $msg");
     return;
   }
@@ -1225,5 +1226,5 @@
 
     # Unassigning a static IP
-    my $sth = $ip_dbh->prepare("select ip,custid,city,ptype,notes,circuitid from poolips".
+    my $sth = $ip_dbh->prepare("select ip,custid,city,type,notes,circuitid from poolips".
 	" where ip='$webvar{block}'");
     $sth->execute();
