fix smartgrid bug by size method