Fix bug where too many components are added