Fixed inner product between vectors of different sizes that was done when the code was compiled for max dim>3.