added a destroy event to clear