Fix parsing of connect message