fixed death condition. now it works correctly.