handle finished events.