Fix minor bug with hosts and certificates