Improved Pipe against locks up when closing.