Fix array instantiation bug