Bug fix for read/write pipes.