fixed death function