network: fixed endless loop and allow formatting of xtended