fix bug in host creation