guard against failure of connect method