fix bug in allocation of empty array when creating types for the primitives