fixed logical error in "sensor alert" processing