When your switch cuts in and out is usually caused by the contacts being corroded or bent and first I would clean with a quality contact cleaner and then check to see if the switch is still intermittent. Often the sweeper blade connected to the toggle arm assembly gets oxidized or dirty from moisture and debris. You need to carefully clean all contact points and check for bent contacts. If the contacts are bent you need to use fine needle nose pliers to straighten them. This can be difficult to do and perhaps the contacts need to be replaced. I've kept old broken switches and removed salvageable contacts. I needed to get small eyelets and a crimping tool for replacing the contacts to make the switch work properly. The whole switch needs to be taken apart to properly repair the lever switch. The molded lever switches can be sprayed with a contact cleaner and if they don't work any better are not worth repairing and should be replaced.