Fix port order/description.
Some bounds checking to ensure array / index correctness.