fix parsing the port