Inverted Z-axis when setting Home
So, I've just finished wiring my Prusa-i3 printer Melzi 2.0. Everything works fine except that whenever I try to home the printer it goes up instead of down. Technically, it thinks it's standing upside-down. I can invert the controls so that everything works fine if I move it manually, but homing still works in the wrong direction. I got to add that it is only Z axis which is inverted, rest is fine. The wiring itself is correct - I double-checked it.