test cleanup for events