Fixed a bug when reading arrays.