Corrected logic for living/dead