fix bug + emit death case