Added code to prevent unity from trying to access the enemy after it has been destroyed