correctly reset pids