Slit your text into paragraphs to make it more readable.
If it's not your switch wiring it's EMI causing spurious triggers, in which case increase the timing for trigger inputs.