fix indexing issue when reading data cubes