fix issue with location of parsed_server.port

which needs to be within the try/except for this to work