fix bug when stopping pipeline server