Fix getEntities

getEntities now assumes continuous numbering and "DataArray::dimensions" is fixed to work with it although dim index starts at 1.