fix connect_io handling