Fixing issues when connecting/disconnecting password keys.