bug fix

repeated dying loop