onDestroy handling added