fix redirection problem in pipepline