Fix logging
Cancel the heartbeat if we know we are dead anyway