Correction for the index change on the getports method