add port allocation fix