Fixed core dump when manager shutdown.