fix demo breakage with non-square grids