Fixed "Cannot read property 'length' of undefined" on unregister when host hasnt been added yet