fix smartgrid bug