fix scalar product of vectors