Fix broken pipe errors