Now the vectors are allocated by their real shape sizes
and a bug fix when building the shape