Fixed a wrong calculation of the vector length for the mechanical parts