Fix datatypes in the legacy handshake