Fix repeated endAll message error.
Update when.