During homing sequence X and Y rails get false positives for homing

While running the homing sequence before the first carve the x and y axis jog for a bit then stop and the x axis reverses its movement and beings to move slowly, if i manually trigger the switch it says complete.