corrected allocation of ports