improve dead flag