Fixed a bug in IdentityKey class.