fix bugs in pipeline