onDestroyed callback added