Added check for death