Sounds to me like you have a 4mm value set for the Z axis of "Distance after Homing". This should be "#define ENDSTOP_Z_BACK_MOVE" in your configuration.h file assuming you are using Repetier firmware.