bug fixed in calling read_grid