When homing machine my y keeps over traveling to the same position at Y.0791.

I replaced the limit switch with a new one because the old one I couldn't get it to click and appeared to be sticking.

I have also tried the p and cancel buttons at power up but still getting a over travel alarm?