fix auto pid refactor bug