Endstop travel of a switch is about 4.9mm according to the CAD model. Put the home-retract distance to 7mm to be on the safe side. See http://umforum.ultimaker.com/index.php?/topic/5935-z-axis-homing-inconsistent-on-um2-workaround-and-patch/page-2