Added protocol version handling