Fix error when using grids with array data provider