better handling of pipe's fault
fixes issue #155