fix setting port.