fix "broken pipe" regression