On/Off switching made more robust.