Fix unique port id issue