improved on/off switch accuracy