Remember last used publickeys.

Hi,
I just made a change to remember the last used public keys.