Change function gr_destroy_grid