Fixed bug that can't save port.