Fix for wrong casting on the new vector-scalar multiplication code