Fixed issue with array creation