fixed broken pipe