fix a bug in pipe.