Fix issue with protocol version always being set to zero.