Fixed bug in display_grid