Fix processing of --port argument