I have had problems with the switch for the PTO on the john Deere L130 , after buying a couple of switches I found that if I clean the plug in harness wires and the terminals and pushed in the wires to the harness the problem disappeared. the wire harness was tarnished which meant limited contact.
Hope this helps someone
Hope this helps someone