Fixed bugs in the piping feature