Pipe restore

pull for merge into 1.4