Fixed vectorization bug