Fixed allocation to not use freed ports