Fixed Bugs in Auto-Grid Size