Fix: the order of the dimensions of grid_size in the constructor was not consistent