Fix reading of the port