corrected port allocation