Fix crash on death