fix bug relating to drawing box and the grid