fix hostname assignment