If you're using the same switches for limit and homing, you need to disable the limit function while homing.

How you do that will depend on what controller/software you're using.