Flipped if statements to fix state and flags changes in SensorCov