I have the same problem in my Prusa I3. I connect inverted X and Y motors and their respective endstop switches.