Fix pipelineFactory bug