Fix null host Exception