diff --git a/core/java/src/net/i2p/data/PrivateKeyFile.java b/core/java/src/net/i2p/data/PrivateKeyFile.java
index 2808f9a699b937024fc9d61cece9da05d89ca35a..4e15b07d13ce3e6438d1386be675f3d0beddf9fb 100644
--- a/core/java/src/net/i2p/data/PrivateKeyFile.java
+++ b/core/java/src/net/i2p/data/PrivateKeyFile.java
@@ -192,13 +192,21 @@ public class PrivateKeyFile {
         this.dest = d;
     }
     
-    /** change cert type - caller must also call write() */
+    /**
+     * Change cert type - caller must also call write().
+     * Side effect - creates new Destination object.
+     */
     public Certificate setCertType(int t) {
         if (this.dest == null)
             throw new IllegalArgumentException("Dest is null");
         Certificate c = new Certificate();
         c.setCertificateType(t);
-        this.dest.setCertificate(c);
+        // dests now immutable, must create new
+        Destination newdest = new Destination();
+        newdest.setPublicKey(dest.getPublicKey());
+        newdest.setSigningPublicKey(dest.getSigningPublicKey());
+        newdest.setCertificate(c);
+        dest = newdest;
         return c;
     }