We only need 'aport' in the event that bport == "" at line 494, should this parsing bemoved inside that conditional?