fix creation of token with hostname instead of ip