fixing bug when character dies