fixed a minor bug in components handling multiple ports
merged