Fixed host name null issue