Fixed a bug with the array setup