Changed on/off logic