fixed pipe bug