Added the onDestroy lifecycle