fixed creation of arrays of structs