Fix encoding and don't let the OS automatically choose a port.