Fix pipe_capture method