Use destroyed event instead of onDestroyed method