Fix the wrong type of dot_product.