Fix errors and events.