fix hostname switch