Adding onDestroy event