fixed lua crash when killing something