fixing hostname validation