Fixed an error in getting the encoded signature from a key exchange