Fixed Issue in auto-assign grid size