Fixing sensor onDeath events