Fixed long port name issue for Mac/Linux