Fixed message throw events and added sync of execution whenever entering
a wait state.