Fix broken pipe