add static check of data size for ctor of vec and mat
some fixes