fixed the ports init