Fix function gr_set_cell()