The wiring had been played with by someone and the ignition switch was bypassed and operated by a switch, I had a new ignition switch installed by a workshops.
I then noticed that the side stand did not have a switch that shut down the engine if you placed it in gear with the engine running and the side stand down.
I managed to buy a used one online and bolted it on.
It has a connection on the end of the wiring, someone said it clips on under the seat, but I cannot find anything there.