Oil pressure light

Oil pressure light came on after a higher speed run (40mph). Felt like power was on/off til I stopped and machine stalls to a stop. I shut key off for a minute or so & light is off and runs normal at slower speeds. I’m thinking that the pressure switch is at fault. I unplugged connection and cleaned it out & used dielectric grease inside connection. I did this with the speedo sensor also but it still doesn’t want to work. Speedo worked when we bought it a month ago & only have two rides on it since we got it. All fluids were changed before riding for the first time. Thanks for your help. Ken