fix dot product