Fixed bug in the normalization of the quaternions