Fix not working when hostkey has not been added