Fix bugs around pipes.