Fix server port reading