Better port initialization