Try to fix calculating the length by stride and offset again. Still not perfect and assumes that the vector has a length that is a multiple of the stride (that should be the case most of the time). Before the last element of a vector was cut off in some situations.