* fix a bug for replce port.