fixed grid_debug and fixed pop_debug