Advice on Limit Switches Sculpfun S9

Hey all.
Need a little help with limit switches.
I have them installed on my S9 but when the machine tries to home it goes in the correct direction. But then hits the X Axis limit switch and then stops, moves back and hit’s it again…repeat…repeat…repeat.
If its far enough along that it hits the Y axis limit it stops as it should but the X axis keeps this bounce going on.
These are my machine settings
[VER:1.1h.20190825:]
[OPT:V,15,128]
$0=10
$1=25
$2=0
$3=0
$4=0
$5=0
$6=0
$10=0
$11=0.010
$12=0.002
$13=0
$20=1
$21=1
$22=1
$23=3
$24=100.000
$25=2000.000
$26=200
$27=3.000
$30=1000
$31=0
$32=1
$100=80.000
$101=80.000
$102=250.000
$110=6000.000
$111=6000.000
$112=1000.000
$120=500.000
$121=500.000
$122=1000.000
$130=404.000
$131=941.000
$132=200.000

Can you issue ? command in Console while this is happening? What’s the output?

What happens if you swap the X and Y limit switches? Do you get the problem on Y or does it stay on X?

Well dang the problem is solved now.
I noticed that one limit switch would light up when the machine hit it and the other did not. I replaced the switch and it works perfectly now.
Thank you for your help.