fixed major pipe bug