fixed several bugs in calling pipeline