fixed crash on death