fixed infinite loop after death