Added terminate end event.