change the method isDead to return correct result