Add code to substitute port.