Fixed ordering problem which thereby stored the wrong (non-existing) key, leading to SSL handshake failure