fix elect bug