Update component.go

Fix bug in value aggregation