Fixed bug affecting the magnitude comptuation of scaled vectors.