Fix script error on death