Auto Home Z-Axis problem

#1
I got the printer to function properly with no errors, but during calibration, when the motors run along the Z-axis, it doesn't stop at the top, and the printer tries to squash the extruder against the top frame rail. I wanted to know if I was doing something wrong here. I apologize if it is a "dumb" question, this is my first 3D printer, so it is especially daunting because of the assembly. Thanks. (I'm not sure if it is the Z axis, but it is during the up motion.)
 
#2
The solution is to flip the plugs in the electric box for the motors, if they are running in the opposite direction during auto home calibration. I flipped them because the instructions said to have the red wires facing forward, but they come preinstalled correctly, with the wires facing the rear, or the fan. Hope this helps anyone that runs into the same problem.