fixed generation of vectors