Bug fix : "Cannot read property 'api_hostname' of undefined"