maybe fix a bug when using temporary keys for a second connection